diff options
author | Sung Yoon Whang <suwhang@microsoft.com> | 2019-06-15 16:46:02 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-15 16:46:02 -0700 |
commit | 37ff0f54f4259e2e9629c62dfc7602c37ee3a97a (patch) | |
tree | aa1ec95414c957c07f237601fca7cd815eae22e7 /src/System.Private.CoreLib | |
parent | db746a1995a2d4c3e4039e6eb51288f098b32551 (diff) | |
download | coreclr-37ff0f54f4259e2e9629c62dfc7602c37ee3a97a.tar.gz coreclr-37ff0f54f4259e2e9629c62dfc7602c37ee3a97a.tar.bz2 coreclr-37ff0f54f4259e2e9629c62dfc7602c37ee3a97a.zip |
Add active timer counter (#25186)
* Add active timer counter
* fix typo
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r-- | src/System.Private.CoreLib/src/System/Diagnostics/Eventing/RuntimeEventSource.cs | 2 |
1 files changed, 2 insertions, 0 deletions
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 20111013dc..1e75d0e7fc 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" }; } } } |