Class AggregatingValueRecorder
IValueRecorder aggregating data by specific period. I.e. per second or per minute. Aggregates number of recorded values and total duration per period.
Inheritance
System.Object
AggregatingValueRecorder
Implements
Namespace: Eco.Shared.Tools
Assembly: Eco.Shared.dll
Syntax
public class AggregatingValueRecorder : Object, IValueRecorder
Constructors
AggregatingValueRecorder(TimeSpan, Boolean)
Declaration
public AggregatingValueRecorder(TimeSpan period, bool aggregateEmpty = true)
Parameters
| Type | Name | Description |
|---|---|---|
| System.TimeSpan | period | |
| System.Boolean | aggregateEmpty |
Properties
AggregatedCount
Returns number of events per period aggregated data. I.e. per second.
Declaration
public AggregatedValue AggregatedCount { get; }
Property Value
| Type | Description |
|---|---|
| AggregatedValue |
AggregateDuration
Returns duration of all events per period aggregated data. I.e. per second.
Declaration
public AggregatedValue AggregateDuration { get; }
Property Value
| Type | Description |
|---|---|
| AggregatedValue |
Period
Aggregation period.
Declaration
public TimeSpan Period { get; }
Property Value
| Type | Description |
|---|---|
| System.TimeSpan |
Methods
FlushCompleted()
Ensures all periods data aggregated. Usually it auto flushes when next period starts, but for rare events it may not happen and require manual flush.
Declaration
public void FlushCompleted()
RecordValue(in PerformanceCounterValue)
Declaration
public void RecordValue(in PerformanceCounterValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| PerformanceCounterValue | value |
Explicit Interface Implementations
IValueRecorder.RecordValue(in PerformanceCounterValue)
Declaration
void IValueRecorder.RecordValue(in PerformanceCounterValue value)
Parameters
| Type | Name | Description |
|---|---|---|
| PerformanceCounterValue | value |