你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

TestGauge Class

  • java.lang.Object
    • com.azure.core.test.utils.metrics.TestGauge

Implements

public class TestGauge
implements LongGauge

Test implementation of gauge allowing to verify what measurements were reported.

Method Summary

Modifier and Type Method and Description
List<Subscription> getSubscriptions()

Gets all subscriptions requested from this instrument.

boolean isEnabled()
AutoCloseable registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)

Methods inherited from java.lang.Object

Method Details

getSubscriptions

public List<TestGauge.Subscription> getSubscriptions()

Gets all subscriptions requested from this instrument.

Returns:

list of all measurements

isEnabled

public boolean isEnabled()

registerCallback

public AutoCloseable registerCallback(Supplier<Long> valueSupplier, TelemetryAttributes attributes)

Parameters:

valueSupplier
attributes

Applies to