Class TestInMemoryHistogram
java.lang.Object
org.opensearch.test.telemetry.TestInMemoryHistogram
- All Implemented Interfaces:
org.opensearch.telemetry.metrics.Histogram
public class TestInMemoryHistogram
extends Object
implements org.opensearch.telemetry.metrics.Histogram
This is a simple implementation of Histogram which is utilized by TestInMemoryMetricsRegistry for
Unit Tests. It initializes an atomic integer to record the value of histogram which doesn't have any tags
along with a map to store the values recorded against the tags.
The map and atomic integer can then be used to get the recorded values.
-
Constructor Details
-
TestInMemoryHistogram
public TestInMemoryHistogram()Constructor.
-
-
Method Details
-
getHistogramValue
-
getHistogramValueForTags
Returns the Histogram value for tags- Returns:
-
record
public void record(double value) - Specified by:
recordin interfaceorg.opensearch.telemetry.metrics.Histogram
-
record
public void record(double value, org.opensearch.telemetry.metrics.tags.Tags tags) - Specified by:
recordin interfaceorg.opensearch.telemetry.metrics.Histogram
-