MetricCollector<T>.GetMeasurementSnapshot(Boolean) 方法

定义

获取此收集器收集的度量快照。

public System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.Diagnostics.Metrics.Testing.CollectedMeasurement<T>> GetMeasurementSnapshot (bool clear = false);
member this.GetMeasurementSnapshot : bool -> System.Collections.Generic.IReadOnlyList<Microsoft.Extensions.Diagnostics.Metrics.Testing.CollectedMeasurement<'T>>
Public Function GetMeasurementSnapshot (Optional clear As Boolean = false) As IReadOnlyList(Of CollectedMeasurement(Of T))

参数

clear
Boolean

将其设置为 true 将自动清除累积度量集。

返回

此收集器记录的度量值,按记录时间排序。

适用于