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 org. which were intended for concurrent operations.
See package description for org. and org. for more details.
| Access | Constructor and Description |
|---|---|
| public | SynchronizedHistogram(final int
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. numberOfSignificantValueDigits)Construct an auto-resizing SynchronizedHistogram with a lowest discernible value of 1 and an auto-adjusting highestTrackableValue. |
| public | SynchronizedHistogram(final long
The highest value to be tracked by the histogram. Must be a positive
integer that is >= 2. highestTrackableValue, final int 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. numberOfSignificantValueDigits)Construct a SynchronizedHistogram given the Highest value to be tracked and a number of significant decimal digits. |
| public | SynchronizedHistogram(final long
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. lowestDiscernibleValue, final long The highest value to be tracked by the histogram. Must be a positive
integer that is >= (2 * lowestDiscernibleValue). highestTrackableValue, final int 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. numberOfSignificantValueDigits)Construct a SynchronizedHistogram given the Lowest and Highest values to be tracked and a number of significant decimal digits. |
| public | SynchronizedHistogram(final AbstractHistogram
The source histogram to duplicate 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 and Description |
|---|---|
| public void | add(final AbstractHistogram
The other histogram. otherHistogram)Overrides org. |
| public void | addWhileCorrectingForCoordinatedOmission(final AbstractHistogram
The other histogram. highestTrackableValue and largestValueWithSingleUnitResolution must match. fromHistogram, final long If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamples expectedIntervalBetweenValueSamples)Overrides org. |
| public synchronized AbstractHistogram. | allValues()
Overrides org. |
| public synchronized SynchronizedHistogram | copy()
Overrides org. |
| public synchronized SynchronizedHistogram | copyCorrectedForCoordinatedOmission(final long
If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamples expectedIntervalBetweenValueSamples)Overrides org. |
| public void | copyInto(final AbstractHistogram
the histogram to copy into targetHistogram)Overrides org. |
| public void | copyIntoCorrectedForCoordinatedOmission(final AbstractHistogram
the histogram to copy into targetHistogram, final long If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamples expectedIntervalBetweenValueSamples)Overrides org. |
| public static SynchronizedHistogram | Returns: The newly constructed histogramThe buffer to decode from buffer, final long Force highestTrackableValue to be set at least this high minBarForHighestTrackableValue)
Construct a new histogram by decoding it from a ByteBuffer.
|
| public static SynchronizedHistogram | Returns: The newly constructed histogramThe buffer to decode from buffer, final long Force highestTrackableValue to be set at least this high minBarForHighestTrackableValue)Hides org. |
| public synchronized int | encodeIntoByteBuffer(final ByteBuffer
The buffer to encode into buffer)Overrides org. |
| public synchronized int | encodeIntoCompressedByteBuffer(final ByteBuffer
The buffer to encode into targetBuffer, final int Compression level (for java.util.zip.Deflater). compressionLevel)Overrides org. |
| public synchronized int | encodeIntoCompressedByteBuffer(final ByteBuffer
The buffer to encode into targetBuffer)Overrides org. |
| public boolean | equals(final Object
the other histogram to compare to other)Overrides org. |
| public static SynchronizedHistogram | Returns: A SynchronizedHistogram decoded from the stringA string containing a base64 encoding of a compressed histogram base64CompressedHistogramString)
Construct a new SynchronizedHistogram by decoding it from a String containing a base64 encoded
compressed histogram representation.
|
| public synchronized long | getCountAtValue(final long
The value for which to provide the recorded count value)Overrides org. |
| public synchronized long | getCountBetweenValues(final long
The lower value bound on the range for which
to provide the recorded count. Will be rounded down with
lowValue, final long lowestEquivalentValue.The higher value bound on the range for which to provide the recorded count.
Will be rounded up with highValue)highestEquivalentValue.Overrides org. |
| public synchronized long | getEndTimeStamp()
Overrides org. |
| public synchronized int | getEstimatedFootprintInBytes()
Overrides org. |
| public synchronized long | getHighestTrackableValue()
Overrides org. |
| public synchronized long | getLowestDiscernibleValue()
Overrides org. |
| public synchronized long | getMaxValue()
Get the highest recorded value level in the histogram.
|
| public synchronized double | getMaxValueAsDouble()
Overrides org. |
| public synchronized double | getMean()
Overrides org. |
| public synchronized long | getMinNonZeroValue()
Overrides org. |
| public synchronized long | getMinValue()
Get the lowest recorded value level in the histogram.
|
| public synchronized int | getNeededByteBufferCapacity()
Overrides org. |
| public synchronized int | getNumberOfSignificantValueDigits()
Overrides org. |
| public synchronized double | getPercentileAtOrBelowValue(final long
The value for which to return the associated percentile value)Overrides org. |
| public synchronized long | getStartTimeStamp()
Overrides org. |
| public synchronized double | getStdDeviation()
Overrides org. |
| public synchronized long | getTotalCount()
Overrides org. |
| public synchronized long | getValueAtPercentile(final double
The percentile for which to return the associated value percentile)Overrides org. |
| public synchronized int | hashCode()
Overrides org. |
| public synchronized long | highestEquivalentValue(final long
The given value value)Overrides org. |
| public synchronized boolean | isAutoResize()
Indicate whether or not the histogram is set to auto-resize and auto-adjust it's
highestTrackableValue
|
| public synchronized AbstractHistogram. | linearBucketValues(final long
The size (in value units) of the linear buckets to use valueUnitsPerBucket)Overrides org. |
| public synchronized AbstractHistogram. | logarithmicBucketValues(final long
The size (in value units) of the first bucket in the iteration valueUnitsInFirstBucket, final double The multiplier by which bucket sizes will grow in each iteration step logBase)Overrides org. |
| public synchronized long | lowestEquivalentValue(final long
The given value value)Overrides org. |
| public synchronized long | medianEquivalentValue(final long
The given value value)Overrides org. |
| public synchronized long | nextNonEquivalentValue(final long
The given value value)Overrides org. |
| public synchronized void | outputPercentileDistribution(final PrintStream
Stream into which the distribution will be output
printStream, final Double The scaling factor by which to divide histogram recorded values units in
output outputValueUnitScalingRatio)Overrides org. |
| public synchronized void | outputPercentileDistribution(final PrintStream
Stream into which the distribution will be output
printStream, final int The number of reporting points per exponentially decreasing half-distance
percentileTicksPerHalfDistance, final Double The scaling factor by which to divide histogram recorded values units in
output outputValueUnitScalingRatio)Overrides org. |
| public synchronized void | outputPercentileDistribution(final PrintStream
Stream into which the distribution will be output
printStream, final int The number of reporting points per exponentially decreasing half-distance
percentileTicksPerHalfDistance, final Double The scaling factor by which to divide histogram recorded values units in
output outputValueUnitScalingRatio, final boolean Output in CSV format if true. Otherwise use plain text form. useCsvFormat)Overrides org. |
| public synchronized AbstractHistogram. | percentiles(final int
The number of iteration steps per half-distance to 100%. percentileTicksPerHalfDistance)
Provide a means of iterating through histogram values according to percentile levels.
|
| private void | |
| public synchronized AbstractHistogram. | recordedValues()
Overrides org. |
| public synchronized void | recordValue(final long
The value to be recorded value)Overrides org. Implements org. |
| public synchronized void | recordValue(final long
The value to record value, final long If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamples expectedIntervalBetweenValueSamples)Overrides org.
Deprecated
|
| public synchronized void | recordValueWithCount(final long
The value to be recorded value, final long The number of occurrences of this value to record count)Overrides org. Implements org. |
| public synchronized void | recordValueWithExpectedInterval(final long
The value to record value, final long If expectedIntervalBetweenValueSamples is larger than 0, add
auto-generated value records as appropriate if value is larger
than expectedIntervalBetweenValueSamples expectedIntervalBetweenValueSamples)Overrides org. Implements org. |
| public synchronized void | reset()
Overrides org. Implements org. |
| public synchronized void | setAutoResize(boolean
autoResize setting autoResize)
Control whether or not the histogram can auto-resize and auto-adjust it's
highestTrackableValue
|
| public synchronized void | setEndTimeStamp(final long
the value to set the time stamp to, [by convention] in msec since the epoch. timeStampMsec)Overrides org. |
| public synchronized void | setStartTimeStamp(final long
the value to set the time stamp to, [by convention] in msec since the epoch. timeStampMsec)Overrides org. |
| public synchronized void | shiftValuesLeft(final int
The number of binary orders of magnitude to shift by numberOfBinaryOrdersOfMagnitude)Overrides org. |
| public synchronized void | shiftValuesRight(final int
The number of binary orders of magnitude to shift by numberOfBinaryOrdersOfMagnitude)Overrides org. |
| public synchronized long | sizeOfEquivalentValueRange(final long
The given value value)Overrides org. |
| public void | subtract(final AbstractHistogram
The other histogram. otherHistogram)Overrides org. |
| public synchronized boolean | valuesAreEquivalent(final long
first value to compare value1, final long second value to compare value2)Overrides org. |