From: Sung Yoon Whang Date: Sat, 15 Jun 2019 23:46:02 +0000 (-0700) Subject: Add active timer counter (#25186) X-Git-Tag: accepted/tizen/unified/20190813.215958~40^2~140 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=37ff0f54f4259e2e9629c62dfc7602c37ee3a97a;p=platform%2Fupstream%2Fcoreclr.git Add active timer counter (#25186) * Add active timer counter * fix typo --- diff --git a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs index 2011101..1e75d0e 100644 --- a/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs +++ b/src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs @@ -31,6 +31,7 @@ namespace System.Diagnostics.Tracing private PollingCounter? _lohSizeCounter; private IncrementingPollingCounter? _allocRateCounter; private PollingCounter? _assemblyCounter; + private PollingCounter? _timerCounter; private const int EnabledPollingIntervalMilliseconds = 1000; // 1 second @@ -70,6 +71,7 @@ namespace System.Diagnostics.Tracing _lohSizeCounter = _lohSizeCounter ?? new PollingCounter("loh-size", this, () => GC.GetGenerationSize(3)) { DisplayName = "LOH Size" }; _allocRateCounter = _allocRateCounter ?? new IncrementingPollingCounter("alloc-rate", this, () => GC.GetTotalAllocatedBytes()) { DisplayName = "Allocation Rate", DisplayRateTimeScale = new TimeSpan(0, 0, 1) }; _assemblyCounter = _assemblyCounter ?? new PollingCounter("assembly-count", this, () => System.Reflection.Assembly.GetAssemblyCount()) { DisplayName = "Number of Assemblies Loaded" }; + _timerCounter = _timerCounter ?? new PollingCounter("active-timer-count", this, () => Timer.ActiveCount) { DisplayName = "Number of Active Timers" }; } } }