Show / Hide Table of Contents

Class DetectingValueRecorder

PerformanceCounter which detects values which has duration over expected and emits static event for them.

Inheritance
System.Object
DetectingValueRecorder
Implements
IValueRecorder
Namespace: Eco.Shared.Tools
Assembly: Eco.Shared.dll
Syntax
public class DetectingValueRecorder : Object, IValueRecorder

Constructors

DetectingValueRecorder(PerformanceCounter, TimeSpan, Boolean)

Declaration
public DetectingValueRecorder(PerformanceCounter counter, TimeSpan expectedMaxDuration, bool grabStacktrace = false)
Parameters
Type Name Description
PerformanceCounter counter
System.TimeSpan expectedMaxDuration
System.Boolean grabStacktrace

Fields

ExpectedMaxDuration

Declaration
public readonly TimeSpan ExpectedMaxDuration
Field Value
Type Description
System.TimeSpan

GrabStacktrace

Declaration
public readonly bool GrabStacktrace
Field Value
Type Description
System.Boolean

Methods

RecordValue(in PerformanceCounterValue)

Declaration
public void RecordValue(in PerformanceCounterValue value)
Parameters
Type Name Description
PerformanceCounterValue value

Events

PerformanceIssueDetected

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
Type Description
System.Action<PerformanceIssue>

Explicit Interface Implementations

IValueRecorder.RecordValue(in PerformanceCounterValue)

Declaration
void IValueRecorder.RecordValue(in PerformanceCounterValue value)
Parameters
Type Name Description
PerformanceCounterValue value

Implements

IValueRecorder

Extension Methods

CommandLine.FeedFromCommandLine(Object)
CommandLine.ToCommandLineArgs(Object, Func<Object, Boolean>)
ListUtil.DepthFirstTraversal<T>(T, Func<T, IEnumerable<T>>)
EnumerableExtensions.SingleItemAsEnumerable<T>(T)
EventUtils.RaiseEvent<TEventArgs>(Object, String, TEventArgs)
PredicateUtils.MatchesAll<TEnumerable, T>(T, TEnumerable)
PredicateUtils.MatchesAll<T>(T, Func<T, Boolean>[])
PredicateUtils.MatchesAny<TEnumerable, T>(T, TEnumerable)
ReflectionUtils.PropertyValue<T>(Object, PropertyInfo)
ReflectionUtils.TryGetPropertyValueByName<T>(Object, String, out T)
ReflectionUtils.GetPropertyValueByName<T>(Object, String)
ReflectionUtils.SetPropertyByName(Object, String, Object)
ReflectionUtils.GetStructPropertyByName<T>(Object, String)
ReflectionUtils.GetStringPropertyByName(Object, String)
ReflectionUtils.ZipByProperty<T>(Object, Object, Object, Func<T, T, T>)
☀
☾
In This Article
Back to top
Copyright (c) Strange Loop Games 2021
☀
☾