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()
Get value and reset.
|
void |
recordValue(long val) |
public HistogramMetric(int numberOfSignificantValueDigits)
public HistogramMetric(Long highestTrackableValue, int numberOfSignificantValueDigits)
public HistogramMetric(Long lowestDiscernibleValue, Long highestTrackableValue, int numberOfSignificantValueDigits)
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()
IMetric
getValueAndReset
in interface IMetric
IMetricsConsumer#handleDataPoints(org.apache.storm.metric.api.IMetricsConsumer
.TaskInfo,
java.util.Collection)
. If null is returned nothing will be sent. If this value can be reset, like with a counter, a side effect
of calling this should be that the value is reset.Copyright © 2023 The Apache Software Foundation. All rights reserved.