語言

MetricCollector<T> 類別

定義

收集從 或 Instrument<T>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

類型參數

T

記錄的指標資料類型。

繼承
MetricCollector<T>
實作

建構函式

名稱 Description
MetricCollector<T>(Instrument<T>, TimeProvider)

初始化 MetricCollector<T> 類別的新執行個體。

MetricCollector<T>(Meter, String, TimeProvider)

初始化 MetricCollector<T> 類別的新執行個體。

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

初始化 MetricCollector<T> 類別的新執行個體。

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

初始化 MetricCollector<T> 類別的新執行個體。

屬性

名稱 Description
Instrument

知道 Instrument 正在錄音。

LastMeasurement

取得最新的測量數據(如果有的話)。

方法

名稱 Description
Clear()

從收集器中移除所有累積的測量數據。

Dispose()

處理掉這些資料 MetricCollector<T> 並停止記錄測量。

GetMeasurementSnapshot(Boolean)

取得該採集器所收集的測量數據快照。

RecordObservableInstruments()

記錄所有已登記的可觀測儀器。

WaitForMeasurementsAsync(Int32, CancellationToken)

回傳一項任務,當收集者收集到最低測量數量後完成。

WaitForMeasurementsAsync(Int32, TimeSpan)

回傳一項任務,當收集者收集到最低測量數量後完成。

適用於