Partajați prin


MetricCollector<T> Class

Definition

Collects the measurements published from an Instrument<T> or ObservableInstrument<T>.

generic <typename T>
 where T : value classpublic ref class MetricCollector sealed : IDisposable
public sealed class MetricCollector<T> : IDisposable where T : struct
type MetricCollector<'T (requires 'T : struct)> = class
    interface IDisposable
Public NotInheritable Class MetricCollector(Of T)
Implements IDisposable

Type Parameters

T

The type of metric data being recorded.

Inheritance
MetricCollector<T>
Implements

Constructors

MetricCollector<T>(Instrument<T>, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(Meter, String, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(Object, String, String, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

MetricCollector<T>(ObservableInstrument<T>, TimeProvider)

Initializes a new instance of the MetricCollector<T> class.

Properties

Instrument

Gets the Instrument that is being recorded.

LastMeasurement

Gets the latest measurement collected, if any.

Methods

Clear()

Removes all accumulated measurements from the collector.

Dispose()

Disposes the MetricCollector<T> and stops recording measurements.

Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetMeasurementSnapshot(Boolean)

Gets a snapshot of measurements collected by this collector.

GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
RecordObservableInstruments()

Scan all registered observable instruments.

ToString()

Returns a string that represents the current object.

(Inherited from Object)
WaitForMeasurementsAsync(Int32, CancellationToken)

Returns a task that completes when the collector has collected a minimum number of measurements.

WaitForMeasurementsAsync(Int32, TimeSpan)

Returns a task that completes when the collector has collected a minimum number of measurements.

Applies to