Constructor and Description |
---|
HistogramMetric(int numberOfSignificantValueDigits) |
HistogramMetric(Long highestTrackableValue,
int numberOfSignificantValueDigits) |
HistogramMetric(Long lowestDiscernibleValue,
Long highestTrackableValue,
int numberOfSignificantValueDigits)
(From the Constructor of Histogram) Construct a Histogram given the Lowest and Highest values to be tracked and a number of significant decimal digits.
|
Modifier and Type | Method and Description |
---|---|
Object |
getValueAndReset() |
void |
recordValue(long val) |
public HistogramMetric(int numberOfSignificantValueDigits)
public HistogramMetric(Long highestTrackableValue, int numberOfSignificantValueDigits)
public HistogramMetric(Long lowestDiscernibleValue, Long highestTrackableValue, int numberOfSignificantValueDigits)
(From the Constructor of Histogram) Construct a Histogram given the Lowest and Highest values to be tracked and a number of significant decimal digits. Providing a lowestDiscernibleValue is useful is situations where the units used for the histogram’s values are much smaller that the minimal accuracy required. E.g. when tracking time values stated in nanosecond units, where the minimal accuracy required is a microsecond, the proper value for lowestDiscernibleValue would be 1000.
lowestDiscernibleValue
- The lowest value that can be discerned (distinguished from 0) by the histogram. Must be a positive integer that is >= 1. May be internally rounded down to nearest power of 2 (if null 1 is used).highestTrackableValue
- The highest value to be tracked by the histogram. Must be a positive integer that is >= (2 * lowestDiscernibleValue). (if null 2 * lowestDiscernibleValue is used and auto-resize is enabled)numberOfSignificantValueDigits
- Specifies the precision to use. This is the number of significant decimal digits to which the histogram will maintain value resolution and separation. Must be a non-negative integer between 0 and 5.public void recordValue(long val)
public Object getValueAndReset()
getValueAndReset
in interface IMetric
Copyright © 2019 The Apache Software Foundation. All Rights Reserved.