Interface IInstrumentation
Stipulates instrumentation contract
Assembly: Azos.dll
Syntax
public interface IInstrumentation : IApplicationComponent, ILocalizedTimeProvider
Properties
DataTypes
Enumerates distinct types of Datum ever recorded in the instance. This property may be used to build
UIs for instrumentation, i.e. datum type tree. Returned data is NOT ORDERED
Declaration
IEnumerable<Type> DataTypes { get; }
Property Value
Type |
Description |
System.Collections.Generic.IEnumerable<System.Type> |
|
Enabled
Indicates whether instrumentation is enabled
Declaration
Property Value
Type |
Description |
System.Boolean |
|
MaxRecordCount
Gets/Sets the maximum record count that this instance can store
Declaration
int MaxRecordCount { get; }
Property Value
Type |
Description |
System.Int32 |
|
OSInstrumentationIntervalMS
Specifies how often OS instrumentation such as CPU and RAM is sampled.
Value of zero disables OS sampling
Declaration
int OSInstrumentationIntervalMS { get; }
Property Value
Type |
Description |
System.Int32 |
|
Overflown
Returns true to indicate that instrumentation does not have any space left to record more data at the present moment
Declaration
Property Value
Type |
Description |
System.Boolean |
|
ProcessingIntervalMS
Specifies how often aggregation is performed
Declaration
int ProcessingIntervalMS { get; }
Property Value
Type |
Description |
System.Int32 |
|
RecordCount
Returns current record count in the instance
Declaration
Property Value
Type |
Description |
System.Int32 |
|
ResultBufferSize
Returns the size of the ring buffer where result (aggregated) instrumentation records are kept in memory.
The maximum buffer capacity is returned, not how many results have been buffered so far.
If this property is less than or equal to zero then result buffering in memory is disabled
Declaration
int ResultBufferSize { get; }
Property Value
Type |
Description |
System.Int32 |
|
SelfInstrumented
When true, outputs instrumentation data about the self (how many datum buffers, etc.)
Declaration
bool SelfInstrumented { get; }
Property Value
Type |
Description |
System.Boolean |
|
Methods
GetBufferedResults(Int32)
Returns the specified number of samples from the ring result buffer in the near-chronological order,
meaning that data is already sorted by time MOST of the TIME, however sorting is NOT GUARANTEED for all
result records returned as enumeration is a lazy procedure that does not make copies/take locks.
The enumeration is empty if ResultBufferSize is less or equal to zero entries.
If count is less or equal to zero then the system returns all results available.
Declaration
IEnumerable<Datum> GetBufferedResults(int count = 0)
Parameters
Type |
Name |
Description |
System.Int32 |
count |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Datum> |
|
GetBufferedResultsSince(DateTime)
Returns samples starting around the specified UTCdate in the near-chronological order,
meaning that data is already sorted by time MOST of the TIME, however sorting is NOT GUARANTEED for all
result records returned as enumeration is a lazy procedure that does not make copies/take locks.
The enumeration is empty if ResultBufferSize is less or equal to zero entries
Declaration
IEnumerable<Datum> GetBufferedResultsSince(DateTime utcStart)
Parameters
Type |
Name |
Description |
System.DateTime |
utcStart |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<Datum> |
|
GetDatumTypeSources(Type, out Datum)
Enumerates sources per Datum type ever recorded by the instance. This property may be used to build
UIs for instrumentation, i.e. datum type tree. Returned data is NOT ORDERED.
Returns default instance so caller may get default description/unit name
Declaration
IEnumerable<string> GetDatumTypeSources(Type datumType, out Datum defaultInstance)
Parameters
Type |
Name |
Description |
System.Type |
datumType |
|
Datum |
defaultInstance |
|
Returns
Type |
Description |
System.Collections.Generic.IEnumerable<System.String> |
|
Record(Datum)
Records instrumentation datum
Declaration
Parameters
Type |
Name |
Description |
Datum |
datum |
|
Extension Methods