public class StripedHistogram
extends java.lang.Object
| Constructor and Description |
|---|
StripedHistogram(long highestTrackableValue,
int numberOfSignificantValueDigits)
Construct a Histogram given the Highest value to be tracked and a number of significant decimal digits
|
| Modifier and Type | Method and Description |
|---|---|
void |
combine() |
long |
getHighestTrackableValue()
get the configured highestTrackableValue
|
org.HdrHistogram.AbstractHistogram |
getHistogramDataCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples)
Provide access to the histogram's data set, corrected for coordinated omission.
|
int |
getNumberOfSignificantValueDigits()
get the configured numberOfSignificantValueDigits
|
long |
highestEquivalentValue(long value)
Get the highest value that is equivalent to the given value within the histogram's resolution.
|
long |
lowestEquivalentValue(long value)
Get the lowest value that is equivalent to the given value within the histogram's resolution.
|
long |
medianEquivalentValue(long value)
Get a value that lies in the middle (rounded up) of the range of values equivalent the given value.
|
long |
nextNonEquivalentValue(long value)
Get the next value that is not equivalent to the given value within the histogram's resolution.
|
void |
recordValue(long value)
Record a value in the histogram
|
void |
recordValue(long value,
long expectedIntervalBetweenValueSamples)
Deprecated.
Record a value in the histogram. This deprecated method has identical behavior to
recordValueWithExpectedInterval(). It was renamed to avoid ambiguity. |
void |
recordValueWithCount(long value,
long count)
Record a value in the histogram (adding to the value's current count)
|
void |
recordValueWithExpectedInterval(long value,
long expectedIntervalBetweenValueSamples)
Record a value in the histogram.
|
void |
reset()
Reset the contents and stats of this histogram
|
long |
sizeOfEquivalentValueRange(long value)
Get the size (in value units) of the range of values that are equivalent to the given value within the
histogram's resolution.
|
boolean |
valuesAreEquivalent(long value1,
long value2)
Determine if two values are equivalent with the histogram's resolution.
|
public StripedHistogram(long highestTrackableValue,
int numberOfSignificantValueDigits)
highestTrackableValue - The highest value to be tracked by the histogram. Must be a positive
integer that is >= 2.numberOfSignificantValueDigits - 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 combine()
public void recordValue(long value)
throws java.lang.ArrayIndexOutOfBoundsException
value - The value to be recordedjava.lang.ArrayIndexOutOfBoundsExceptionpublic void recordValueWithCount(long value,
long count)
throws java.lang.ArrayIndexOutOfBoundsException
value - The value to be recordedcount - The number of occurrences of this value to recordjava.lang.ArrayIndexOutOfBoundsException@Deprecated
public void recordValue(long value,
long expectedIntervalBetweenValueSamples)
throws java.lang.ArrayIndexOutOfBoundsException
recordValueWithExpectedInterval(). It was renamed to avoid ambiguity.value - The value to recordexpectedIntervalBetweenValueSamples - If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplesjava.lang.ArrayIndexOutOfBoundsExceptionpublic void recordValueWithExpectedInterval(long value,
long expectedIntervalBetweenValueSamples)
throws java.lang.ArrayIndexOutOfBoundsException
To compensate for the loss of sampled values when a recorded value is larger than the expected interval between value samples, Histogram will auto-generate an additional series of decreasingly-smaller (down to the expectedIntervalBetweenValueSamples) value records.
Note: This is a at-recording correction method, as opposed to the post-recording correction method provided
by getHistogramCorrectedForCoordinatedOmission.
The two methods are mutually exclusive, and only one of the two should be be used on a given data set to correct
for the same coordinated omission issue.
See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important.
value - The value to recordexpectedIntervalBetweenValueSamples - If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplesjava.lang.ArrayIndexOutOfBoundsExceptionpublic void reset()
public org.HdrHistogram.AbstractHistogram getHistogramDataCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples)
recordValueWithExpectedInterval. The two
methods are mutually exclusive, and only one of the two should be be used on a given data set to correct
for the same coordinated omission issue.HistogramData that can be used to query stats and iterate through the default (corrected)
data set.public int getNumberOfSignificantValueDigits()
public long getHighestTrackableValue()
public long sizeOfEquivalentValueRange(long value)
value - The given valuepublic long lowestEquivalentValue(long value)
value - The given valuepublic long highestEquivalentValue(long value)
value - The given valuepublic long medianEquivalentValue(long value)
value - The given valuepublic long nextNonEquivalentValue(long value)
value - The given valuepublic boolean valuesAreEquivalent(long value1,
long value2)
value1 - first value to comparevalue2 - second value to compare