TestMeter Class

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

Implements

public class TestMeter
implements Meter

Test meter implementation.

Constructor Summary

Constructor Description
TestMeter()

Creates test meter.

TestMeter(boolean isEnabled)

Creates test meter

Method Summary

Modifier and Type Method and Description
void close()
TelemetryAttributes createAttributes(Map<String,Object> attributeMap)
DoubleHistogram createDoubleHistogram(String name, String description, String unit)
LongCounter createLongCounter(String name, String description, String unit)
LongGauge createLongGauge(String name, String description, String unit)
LongCounter createLongUpDownCounter(String name, String description, String unit)
Map<String,TestCounter> getCounters()

Gets counters created with this meter.

Map<String,TestGauge> getGauges()

Gets gauges created with this meter.

Map<String,TestHistogram> getHistograms()

Gets histograms created with this meter.

Map<String,TestCounter> getUpDownCounters()

Gets up-down counters created with this meter.

boolean isEnabled()

Methods inherited from java.lang.Object

Constructor Details

TestMeter

public TestMeter()

Creates test meter.

TestMeter

public TestMeter(boolean isEnabled)

Creates test meter

Parameters:

isEnabled - flag indicating if meter should be enabled.

Method Details

close

public void close()

createAttributes

public TelemetryAttributes createAttributes(Map attributeMap)

Parameters:

attributeMap

createDoubleHistogram

public DoubleHistogram createDoubleHistogram(String name, String description, String unit)

Parameters:

name
description
unit

createLongCounter

public LongCounter createLongCounter(String name, String description, String unit)

Parameters:

name
description
unit

createLongGauge

public LongGauge createLongGauge(String name, String description, String unit)

Parameters:

name
description
unit

createLongUpDownCounter

public LongCounter createLongUpDownCounter(String name, String description, String unit)

Parameters:

name
description
unit

getCounters

public Map getCounters()

Gets counters created with this meter.

Returns:

map of counters (by counter name)

getGauges

public Map getGauges()

Gets gauges created with this meter.

Returns:

map of counters (by gauge name)

getHistograms

public Map getHistograms()

Gets histograms created with this meter.

Returns:

map of histograms (by histogram name)

getUpDownCounters

public Map getUpDownCounters()

Gets up-down counters created with this meter.

Returns:

map of counters (by counter name)

isEnabled

public boolean isEnabled()

Applies to