Serializable
, ValueRecorder
public class SynchronizedHistogram extends Histogram
A SynchronizedHistogram
is a variant of Histogram
that is
synchronized as a whole, such that queries, copying, and addition operations are atomic with relation to
modification on the SynchronizedHistogram
, and such that external accessors (e.g. iterations on the
histogram data) that synchronize on the SynchronizedHistogram
instance can safely assume that no
modifications to the histogram data occur within their synchronized block.
It is important to note that synchronization can result in blocking recoding calls. If non-blocking recoding
operations are required, consider using ConcurrentHistogram
, AtomicHistogram
, or (recommended)
Recorder
or SingleWriterRecorder
which were intended for concurrent operations.
See package description for org.HdrHistogram
and Histogram
for more details.
AbstractHistogram.AllValues, AbstractHistogram.LinearBucketValues, AbstractHistogram.LogarithmicBucketValues, AbstractHistogram.Percentiles, AbstractHistogram.RecordedValues
Constructor | Description |
---|---|
SynchronizedHistogram(int numberOfSignificantValueDigits) |
Construct an auto-resizing SynchronizedHistogram with a lowest discernible value of 1 and an auto-adjusting
highestTrackableValue.
|
SynchronizedHistogram(long highestTrackableValue,
int numberOfSignificantValueDigits) |
Construct a SynchronizedHistogram given the Highest value to be tracked and a number of significant decimal digits.
|
SynchronizedHistogram(long lowestDiscernibleValue,
long highestTrackableValue,
int numberOfSignificantValueDigits) |
Construct a SynchronizedHistogram given the Lowest and Highest values to be tracked and a number of significant
decimal digits.
|
SynchronizedHistogram(AbstractHistogram source) |
Construct a histogram with the same range settings as a given source histogram,
duplicating the source's start/end timestamps (but NOT it's contents)
|
Modifier and Type | Method | Description |
---|---|---|
void |
add(AbstractHistogram otherHistogram) |
Add the contents of another histogram to this one.
|
void |
addWhileCorrectingForCoordinatedOmission(AbstractHistogram fromHistogram,
long expectedIntervalBetweenValueSamples) |
Add the contents of another histogram to this one, while correcting the incoming data for coordinated omission.
|
AbstractHistogram.AllValues |
allValues() |
Provide a means of iterating through all histogram values using the finest granularity steps supported by
the underlying representation.
|
SynchronizedHistogram |
copy() |
Create a copy of this histogram, complete with data and everything.
|
SynchronizedHistogram |
copyCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples) |
Get a copy of this histogram, corrected for coordinated omission.
|
void |
copyInto(AbstractHistogram targetHistogram) |
Copy this histogram into the target histogram, overwriting it's contents.
|
void |
copyIntoCorrectedForCoordinatedOmission(AbstractHistogram targetHistogram,
long expectedIntervalBetweenValueSamples) |
Copy this histogram, corrected for coordinated omission, into the target histogram, overwriting it's contents.
|
static SynchronizedHistogram |
decodeFromByteBuffer(ByteBuffer buffer,
long minBarForHighestTrackableValue) |
Construct a new histogram by decoding it from a ByteBuffer.
|
static SynchronizedHistogram |
decodeFromCompressedByteBuffer(ByteBuffer buffer,
long minBarForHighestTrackableValue) |
Construct a new histogram by decoding it from a compressed form in a ByteBuffer.
|
int |
encodeIntoByteBuffer(ByteBuffer buffer) |
Encode this histogram into a ByteBuffer
|
int |
encodeIntoCompressedByteBuffer(ByteBuffer targetBuffer) |
Encode this histogram in compressed form into a byte array
|
int |
encodeIntoCompressedByteBuffer(ByteBuffer targetBuffer,
int compressionLevel) |
Encode this histogram in compressed form into a byte array
|
boolean |
equals(Object other) |
Determine if this histogram is equivalent to another.
|
long |
getCountAtValue(long value) |
Get the count of recorded values at a specific value (to within the histogram resolution at the value level).
|
long |
getCountBetweenValues(long lowValue,
long highValue) |
Get the count of recorded values within a range of value levels (inclusive to within the histogram's resolution).
|
long |
getEndTimeStamp() |
get the end time stamp [optionally] stored with this histogram
|
int |
getEstimatedFootprintInBytes() |
Provide a (conservatively high) estimate of the Histogram's total footprint in bytes
|
long |
getHighestTrackableValue() |
get the configured highestTrackableValue
|
long |
getLowestDiscernibleValue() |
get the configured lowestDiscernibleValue
|
long |
getMaxValue() |
Get the highest recorded value level in the histogram.
|
double |
getMaxValueAsDouble() |
Get the highest recorded value level in the histogram as a double
|
double |
getMean() |
Get the computed mean value of all recorded values in the histogram
|
long |
getMinNonZeroValue() |
Get the lowest recorded non-zero value level in the histogram.
|
long |
getMinValue() |
Get the lowest recorded value level in the histogram.
|
int |
getNeededByteBufferCapacity() |
Get the capacity needed to encode this histogram into a ByteBuffer
|
int |
getNumberOfSignificantValueDigits() |
get the configured numberOfSignificantValueDigits
|
double |
getPercentileAtOrBelowValue(long value) |
Get the percentile at a given value.
|
long |
getStartTimeStamp() |
get the start time stamp [optionally] stored with this histogram
|
double |
getStdDeviation() |
Get the computed standard deviation of all recorded values in the histogram
|
long |
getTotalCount() |
Get the total count of all recorded values in the histogram
|
long |
getValueAtPercentile(double percentile) |
Get the value at a given percentile.
|
int |
hashCode() |
|
long |
highestEquivalentValue(long value) |
Get the highest value that is equivalent to the given value within the histogram's resolution.
|
boolean |
isAutoResize() |
Indicate whether or not the histogram is set to auto-resize and auto-adjust it's
highestTrackableValue
|
AbstractHistogram.LinearBucketValues |
linearBucketValues(long valueUnitsPerBucket) |
Provide a means of iterating through histogram values using linear steps.
|
AbstractHistogram.LogarithmicBucketValues |
logarithmicBucketValues(long valueUnitsInFirstBucket,
double logBase) |
Provide a means of iterating through histogram values at logarithmically increasing levels.
|
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 |
outputPercentileDistribution(PrintStream printStream,
int percentileTicksPerHalfDistance,
Double outputValueUnitScalingRatio) |
Produce textual representation of the value distribution of histogram data by percentile.
|
void |
outputPercentileDistribution(PrintStream printStream,
int percentileTicksPerHalfDistance,
Double outputValueUnitScalingRatio,
boolean useCsvFormat) |
Produce textual representation of the value distribution of histogram data by percentile.
|
void |
outputPercentileDistribution(PrintStream printStream,
Double outputValueUnitScalingRatio) |
Produce textual representation of the value distribution of histogram data by percentile.
|
AbstractHistogram.Percentiles |
percentiles(int percentileTicksPerHalfDistance) |
Provide a means of iterating through histogram values according to percentile levels.
|
AbstractHistogram.RecordedValues |
recordedValues() |
Provide a means of iterating through all recorded histogram values using the finest granularity steps
supported by the underlying representation.
|
void |
recordValue(long value) |
Record a value in the histogram
|
void |
recordValue(long value,
long expectedIntervalBetweenValueSamples) |
Deprecated.
|
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
|
void |
setAutoResize(boolean autoResize) |
Control whether or not the histogram can auto-resize and auto-adjust it's
highestTrackableValue
|
void |
setEndTimeStamp(long timeStampMsec) |
Set the end time stamp value associated with this histogram to a given value.
|
void |
setStartTimeStamp(long timeStampMsec) |
Set the start time stamp value associated with this histogram to a given value.
|
void |
shiftValuesLeft(int numberOfBinaryOrdersOfMagnitude) |
Shift recorded values to the left (the equivalent of a << shift operation on all recorded values).
|
void |
shiftValuesRight(int numberOfBinaryOrdersOfMagnitude) |
Shift recorded values to the right (the equivalent of a >> shift operation on all recorded values).
|
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.
|
void |
subtract(AbstractHistogram otherHistogram) |
Subtract the contents of another histogram from this one.
|
boolean |
valuesAreEquivalent(long value1,
long value2) |
Determine if two values are equivalent with the histogram's resolution.
|
getTag, recordConvertedDoubleValueWithCount, setTag, supportsAutoResize
public SynchronizedHistogram(int numberOfSignificantValueDigits)
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 SynchronizedHistogram(long highestTrackableValue, int numberOfSignificantValueDigits)
highestTrackableValue
- The highest value to be tracked by the histogram. Must be a positive
integer that is >= 2.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 SynchronizedHistogram(long lowestDiscernibleValue, long highestTrackableValue, int numberOfSignificantValueDigits)
lowestDiscernibleValue
- The lowest value that can be tracked (distinguished from 0) by the histogram.
Must be a positive integer that is >= 1. May be internally rounded
down to nearest power of 2.highestTrackableValue
- The highest value to be tracked by the histogram. Must be a positive
integer that is >= (2 * lowestDiscernibleValue).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 SynchronizedHistogram(AbstractHistogram source)
source
- The source histogram to duplicatepublic static SynchronizedHistogram decodeFromByteBuffer(ByteBuffer buffer, long minBarForHighestTrackableValue)
buffer
- The buffer to decode fromminBarForHighestTrackableValue
- Force highestTrackableValue to be set at least this highpublic static SynchronizedHistogram decodeFromCompressedByteBuffer(ByteBuffer buffer, long minBarForHighestTrackableValue) throws DataFormatException
buffer
- The buffer to decode fromminBarForHighestTrackableValue
- Force highestTrackableValue to be set at least this highDataFormatException
- on error parsing/decompressing the bufferpublic long getTotalCount()
AbstractHistogram
getTotalCount
in class Histogram
public boolean isAutoResize()
AbstractHistogram
isAutoResize
in class AbstractHistogram
public void setAutoResize(boolean autoResize)
AbstractHistogram
setAutoResize
in class AbstractHistogram
autoResize
- autoResize settingpublic void recordValue(long value) throws ArrayIndexOutOfBoundsException
AbstractHistogram
recordValue
in interface ValueRecorder
recordValue
in class AbstractHistogram
value
- The value to be recordedArrayIndexOutOfBoundsException
- (may throw) if value is exceeds highestTrackableValuepublic void recordValueWithCount(long value, long count) throws ArrayIndexOutOfBoundsException
AbstractHistogram
recordValueWithCount
in interface ValueRecorder
recordValueWithCount
in class AbstractHistogram
value
- The value to be recordedcount
- The number of occurrences of this value to recordArrayIndexOutOfBoundsException
- (may throw) if value is exceeds highestTrackableValuepublic void recordValueWithExpectedInterval(long value, long expectedIntervalBetweenValueSamples) throws ArrayIndexOutOfBoundsException
AbstractHistogram
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 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.
See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important.
recordValueWithExpectedInterval
in interface ValueRecorder
recordValueWithExpectedInterval
in class AbstractHistogram
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 is exceeds highestTrackableValuepublic void recordValue(long value, long expectedIntervalBetweenValueSamples) throws ArrayIndexOutOfBoundsException
recordValue
in class AbstractHistogram
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 is exceeds highestTrackableValuepublic void reset()
AbstractHistogram
reset
in interface ValueRecorder
reset
in class AbstractHistogram
public SynchronizedHistogram copy()
AbstractHistogram
public SynchronizedHistogram copyCorrectedForCoordinatedOmission(long expectedIntervalBetweenValueSamples)
AbstractHistogram
To compensate for the loss of sampled values when a recorded value is larger than the expected
interval between value samples, the new histogram will include an auto-generated additional series of
decreasingly-smaller (down to the expectedIntervalBetweenValueSamples) value records for each count found
in the current histogram that is larger than the expectedIntervalBetweenValueSamples.
Note: This is a post-correction method, as opposed to the at-recording correction method provided
by 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.
by
See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important.
copyCorrectedForCoordinatedOmission
in class Histogram
expectedIntervalBetweenValueSamples
- If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplespublic void copyInto(AbstractHistogram targetHistogram)
AbstractHistogram
copyInto
in class AbstractHistogram
targetHistogram
- the histogram to copy intopublic void copyIntoCorrectedForCoordinatedOmission(AbstractHistogram targetHistogram, long expectedIntervalBetweenValueSamples)
AbstractHistogram
AbstractHistogram.copyCorrectedForCoordinatedOmission(long)
for more detailed explanation about how correction is applied)copyIntoCorrectedForCoordinatedOmission
in class AbstractHistogram
targetHistogram
- the histogram to copy intoexpectedIntervalBetweenValueSamples
- If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplespublic void add(AbstractHistogram otherHistogram)
AbstractHistogram
As part of adding the contents, the start/end timestamp range of this histogram will be extended to include the start/end timestamp range of the other histogram.
add
in class AbstractHistogram
otherHistogram
- The other histogram.public void subtract(AbstractHistogram otherHistogram) throws ArrayIndexOutOfBoundsException, IllegalArgumentException
AbstractHistogram
The start/end timestamps of this histogram will remain unchanged.
subtract
in class AbstractHistogram
otherHistogram
- The other histogram.ArrayIndexOutOfBoundsException
- (may throw) if values in otherHistogram's are higher than highestTrackableValue.IllegalArgumentException
public void addWhileCorrectingForCoordinatedOmission(AbstractHistogram fromHistogram, long expectedIntervalBetweenValueSamples)
AbstractHistogram
To compensate for the loss of sampled values when a recorded value is larger than the expected
interval between value samples, the values added will include an auto-generated additional series of
decreasingly-smaller (down to the expectedIntervalBetweenValueSamples) value records for each count found
in the current histogram that is larger than the expectedIntervalBetweenValueSamples.
Note: This is a post-recording correction method, as opposed to the at-recording correction method provided
by 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.
by
See notes in the description of the Histogram calls for an illustration of why this corrective behavior is important.
addWhileCorrectingForCoordinatedOmission
in class AbstractHistogram
fromHistogram
- The other histogram. highestTrackableValue and largestValueWithSingleUnitResolution must match.expectedIntervalBetweenValueSamples
- If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamplespublic void shiftValuesLeft(int numberOfBinaryOrdersOfMagnitude)
AbstractHistogram
ArrayIndexOutOfBoundsException
will be thrown if any recorded values may be lost
as a result of the attempted operation, reflecting an "overflow" conditions. Expect such an overflow
exception if the operation would cause the current maxValue to be scaled to a value that is outside
of the covered value range.shiftValuesLeft
in class AbstractHistogram
numberOfBinaryOrdersOfMagnitude
- The number of binary orders of magnitude to shift bypublic void shiftValuesRight(int numberOfBinaryOrdersOfMagnitude)
AbstractHistogram
Shift right operations that do not underflow are reversible with a shift left operation with no loss of
information. An ArrayIndexOutOfBoundsException
reflecting an "underflow" conditions will be thrown
if any recorded values may lose representation accuracy as a result of the attempted shift operation.
For a shift of a single order of magnitude, expect such an underflow exception if any recorded non-zero values up to [numberOfSignificantValueDigits (rounded up to nearest power of 2) multiplied by (2 ^ numberOfBinaryOrdersOfMagnitude) currently exist in the histogram.
shiftValuesRight
in class AbstractHistogram
numberOfBinaryOrdersOfMagnitude
- The number of binary orders of magnitude to shift bypublic boolean equals(Object other)
AbstractHistogram
equals
in class AbstractHistogram
other
- the other histogram to compare topublic int hashCode()
hashCode
in class AbstractHistogram
public long getLowestDiscernibleValue()
AbstractHistogram
getLowestDiscernibleValue
in class AbstractHistogram
public long getHighestTrackableValue()
AbstractHistogram
getHighestTrackableValue
in class AbstractHistogram
public int getNumberOfSignificantValueDigits()
AbstractHistogram
getNumberOfSignificantValueDigits
in class AbstractHistogram
public long sizeOfEquivalentValueRange(long value)
AbstractHistogram
sizeOfEquivalentValueRange
in class AbstractHistogram
value
- The given valuepublic long lowestEquivalentValue(long value)
AbstractHistogram
lowestEquivalentValue
in class AbstractHistogram
value
- The given valuepublic long highestEquivalentValue(long value)
AbstractHistogram
highestEquivalentValue
in class AbstractHistogram
value
- The given valuepublic long medianEquivalentValue(long value)
AbstractHistogram
medianEquivalentValue
in class AbstractHistogram
value
- The given valuepublic long nextNonEquivalentValue(long value)
AbstractHistogram
nextNonEquivalentValue
in class AbstractHistogram
value
- The given valuepublic boolean valuesAreEquivalent(long value1, long value2)
AbstractHistogram
valuesAreEquivalent
in class AbstractHistogram
value1
- first value to comparevalue2
- second value to comparepublic int getEstimatedFootprintInBytes()
AbstractHistogram
getEstimatedFootprintInBytes
in class AbstractHistogram
public long getStartTimeStamp()
AbstractHistogram
getStartTimeStamp
in class AbstractHistogram
public void setStartTimeStamp(long timeStampMsec)
AbstractHistogram
setStartTimeStamp
in class AbstractHistogram
timeStampMsec
- the value to set the time stamp to, [by convention] in msec since the epoch.public long getEndTimeStamp()
AbstractHistogram
getEndTimeStamp
in class AbstractHistogram
public void setEndTimeStamp(long timeStampMsec)
AbstractHistogram
setEndTimeStamp
in class AbstractHistogram
timeStampMsec
- the value to set the time stamp to, [by convention] in msec since the epoch.public long getMinValue()
AbstractHistogram
getMinValue
in class AbstractHistogram
public long getMaxValue()
AbstractHistogram
getMaxValue
in class AbstractHistogram
public long getMinNonZeroValue()
AbstractHistogram
getMinNonZeroValue
in class AbstractHistogram
public double getMaxValueAsDouble()
AbstractHistogram
getMaxValueAsDouble
in class AbstractHistogram
public double getMean()
AbstractHistogram
getMean
in class AbstractHistogram
public double getStdDeviation()
AbstractHistogram
getStdDeviation
in class AbstractHistogram
public long getValueAtPercentile(double percentile)
AbstractHistogram
Note that two values are "equivalent" in this statement if
AbstractHistogram.valuesAreEquivalent(long, long)
would return true.
getValueAtPercentile
in class AbstractHistogram
percentile
- The percentile for which to return the associated valuepublic double getPercentileAtOrBelowValue(long value)
AbstractHistogram
Note that two values are "equivalent" in this statement if
AbstractHistogram.valuesAreEquivalent(long, long)
would return true.
getPercentileAtOrBelowValue
in class AbstractHistogram
value
- The value for which to return the associated percentilepublic long getCountBetweenValues(long lowValue, long highValue) throws ArrayIndexOutOfBoundsException
AbstractHistogram
getCountBetweenValues
in class AbstractHistogram
lowValue
- The lower value bound on the range for which
to provide the recorded count. Will be rounded down with
lowestEquivalentValue
.highValue
- The higher value bound on the range for which to provide the recorded count.
Will be rounded up with highestEquivalentValue
.ArrayIndexOutOfBoundsException
public long getCountAtValue(long value) throws ArrayIndexOutOfBoundsException
AbstractHistogram
getCountAtValue
in class AbstractHistogram
value
- The value for which to provide the recorded countArrayIndexOutOfBoundsException
public AbstractHistogram.Percentiles percentiles(int percentileTicksPerHalfDistance)
AbstractHistogram
percentiles
in class AbstractHistogram
percentileTicksPerHalfDistance
- The number of iteration steps per half-distance to 100%.Iterable
<HistogramIterationValue
>
through the histogram using a
PercentileIterator
public AbstractHistogram.LinearBucketValues linearBucketValues(long valueUnitsPerBucket)
AbstractHistogram
linearBucketValues
in class AbstractHistogram
valueUnitsPerBucket
- The size (in value units) of the linear buckets to useIterable
<HistogramIterationValue
>
through the histogram using a
LinearIterator
public AbstractHistogram.LogarithmicBucketValues logarithmicBucketValues(long valueUnitsInFirstBucket, double logBase)
AbstractHistogram
logarithmicBucketValues
in class AbstractHistogram
valueUnitsInFirstBucket
- The size (in value units) of the first bucket in the iterationlogBase
- The multiplier by which bucket sizes will grow in each iteration stepIterable
<HistogramIterationValue
>
through the histogram using
a LogarithmicIterator
public AbstractHistogram.RecordedValues recordedValues()
AbstractHistogram
recordedValues
in class AbstractHistogram
Iterable
<HistogramIterationValue
>
through the histogram using
a RecordedValuesIterator
public AbstractHistogram.AllValues allValues()
AbstractHistogram
allValues
in class AbstractHistogram
Iterable
<HistogramIterationValue
>
through the histogram using
a AllValuesIterator
public void outputPercentileDistribution(PrintStream printStream, Double outputValueUnitScalingRatio)
AbstractHistogram
outputPercentileDistribution
in class AbstractHistogram
printStream
- Stream into which the distribution will be output
outputValueUnitScalingRatio
- The scaling factor by which to divide histogram recorded values units in
outputpublic void outputPercentileDistribution(PrintStream printStream, int percentileTicksPerHalfDistance, Double outputValueUnitScalingRatio)
AbstractHistogram
outputPercentileDistribution
in class AbstractHistogram
printStream
- Stream into which the distribution will be output
percentileTicksPerHalfDistance
- The number of reporting points per exponentially decreasing half-distance
outputValueUnitScalingRatio
- The scaling factor by which to divide histogram recorded values units in
outputpublic void outputPercentileDistribution(PrintStream printStream, int percentileTicksPerHalfDistance, Double outputValueUnitScalingRatio, boolean useCsvFormat)
AbstractHistogram
outputPercentileDistribution
in class AbstractHistogram
printStream
- Stream into which the distribution will be output
percentileTicksPerHalfDistance
- The number of reporting points per exponentially decreasing half-distance
outputValueUnitScalingRatio
- The scaling factor by which to divide histogram recorded values units in
outputuseCsvFormat
- Output in CSV format if true. Otherwise use plain text form.public int getNeededByteBufferCapacity()
AbstractHistogram
getNeededByteBufferCapacity
in class AbstractHistogram
public int encodeIntoByteBuffer(ByteBuffer buffer)
AbstractHistogram
encodeIntoByteBuffer
in class AbstractHistogram
buffer
- The buffer to encode intopublic int encodeIntoCompressedByteBuffer(ByteBuffer targetBuffer, int compressionLevel)
AbstractHistogram
encodeIntoCompressedByteBuffer
in class AbstractHistogram
targetBuffer
- The buffer to encode intocompressionLevel
- Compression level (for java.util.zip.Deflater).public int encodeIntoCompressedByteBuffer(ByteBuffer targetBuffer)
AbstractHistogram
encodeIntoCompressedByteBuffer
in class AbstractHistogram
targetBuffer
- The buffer to encode intoCopyright © 2019. All rights reserved.