AbstractHistogram
, AtomicHistogram
, ConcurrentHistogram
, Histogram
, IntCountsHistogram
, Recorder
, ShortCountsHistogram
, SingleWriterRecorder
, SynchronizedHistogram
public interface ValueRecorder
Modifier and Type | Method | Description |
---|---|---|
void |
recordValue(long value) |
Record a value
|
void |
recordValueWithCount(long value,
long count) |
Record a value (adding to the value's current count)
|
void |
recordValueWithExpectedInterval(long value,
long expectedIntervalBetweenValueSamples) |
Record a value.
|
void |
reset() |
Reset the contents and collected stats
|
void recordValue(long value) throws ArrayIndexOutOfBoundsException
value
- The value to be recordedArrayIndexOutOfBoundsException
- (may throw) if value cannot be covered by the histogram's rangevoid recordValueWithCount(long value, long count) throws ArrayIndexOutOfBoundsException
value
- The value to be recordedcount
- The number of occurrences of this value to recordArrayIndexOutOfBoundsException
- (may throw) if value cannot be covered by the histogram's rangevoid recordValueWithExpectedInterval(long value, long expectedIntervalBetweenValueSamples) throws ArrayIndexOutOfBoundsException
To compensate for the loss of sampled values when a recorded value is larger than the expected interval between value samples, 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 AbstractHistogram.copyCorrectedForCoordinatedOmission(long)
.
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.
value
- The value to recordexpectedIntervalBetweenValueSamples
- If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplesArrayIndexOutOfBoundsException
- (may throw) if value cannot be covered by the histogram's rangevoid reset()
Copyright © 2019. All rights reserved.