Class DetectingValueRecorder
PerformanceCounter which detects values which has duration over expected and emits static event for them.
Inheritance
System.Object
DetectingValueRecorder
Assembly: Eco.Shared.dll
public class DetectingValueRecorder : Object, IValueRecorder
Constructors
Declaration
public DetectingValueRecorder(PerformanceCounter counter, TimeSpan expectedMaxDuration, bool grabStacktrace = false)
Parameters
| Type |
Name |
Description |
| PerformanceCounter |
counter |
|
| System.TimeSpan |
expectedMaxDuration |
|
| System.Boolean |
grabStacktrace |
|
Fields
Declaration
public readonly TimeSpan ExpectedMaxDuration
Field Value
| Type |
Description |
| System.TimeSpan |
|
Declaration
public readonly bool GrabStacktrace
Field Value
| Type |
Description |
| System.Boolean |
|
Methods
Declaration
public void RecordValue(in PerformanceCounterValue value)
Parameters
Events
Event which reported every time when outstanding value detected. Stack trace is optional and only provided when GrabStacktrace is true.
Declaration
public static event Action<PerformanceIssue> PerformanceIssueDetected
Event Type
Explicit Interface Implementations
Declaration
void IValueRecorder.RecordValue(in PerformanceCounterValue value)
Parameters
Implements
Extension Methods