public class ResponseTimeHistogramReporter extends AbstractReporter
Reports response time in milliseconds using HDR Histogram that can computationally correct the Coordinated omission problem.
The following paragraphs are based on the HDR Histogram documentation.
This reporter depends on the features introduced by HDR Histogram to correct the coordinated omission.
To compensate for the loss of sampled values when a recorded value is larger than the expected,
interval between value samples, HDR Histogram will auto-generate an additional series of decreasingly-smaller value records.
The values go down to the expectedValue
in case of the ResponseTimeHistogramReporter.Correction.USER
correction mode, or down to the average response time in
case of the ResponseTimeHistogramReporter.Correction.AUTO
correction mode.
The reporter could be configured to track the counts of observed response times in milliseconds between 0 and 3,600,000
(maxExpectedValue
) while maintaining a value precision of 3 (precision
) significant digits across that range.
Value quantization within the range will thus be no larger than 1/1,000th (or 0.1%) of any value. This example reporter could be used to track
and analyze the counts of observed response times ranging between 1 millisecond and 1 hour in magnitude, while maintaining a value resolution
of 1 millisecond (or better) up to one second, and a resolution of 1 second (or better) up to 1,000 seconds.
At its maximum tracked value (1 hour), it would still maintain a resolution of 3.6 seconds (or better).
Modifier and Type | Class and Description |
---|---|
static class |
ResponseTimeHistogramReporter.Correction
Correction mode can be switched off (no correction), automatic or user specified.
|
Constructor and Description |
---|
ResponseTimeHistogramReporter() |
Modifier and Type | Method and Description |
---|---|
ResponseTimeHistogramReporter.Correction |
getCorrectionMode()
Gets the expectedValue of coordinated omission in the resulting histogram.
|
int |
getDetail()
Gets the detail level of the result (the number of iteration steps per half-distance to 100%).
|
long |
getExpectedValue()
Gets the expectedValue value for the coordinated omission when the
ResponseTimeHistogramReporter.Correction.USER mode is set. |
long |
getMaxExpectedValue()
Gets the maximum expected value to better organize the data in the histogram.
|
int |
getPrecision()
Gets the precision as the number of significant digits that are recognized by this reporter.
|
String |
getPrefix()
Gets the prefix of percentile values in the result map.
|
boolean |
isFilter()
Gets the state of results filter.
|
void |
publishResult(PeriodType periodType,
Destination destination)
Publishes results to the destination.
|
ResponseTimeHistogramReporter |
setCorrectionMode(ResponseTimeHistogramReporter.Correction correctionMode)
Sets the expectedValue of coordinated omission in the resulting histogram.
|
ResponseTimeHistogramReporter |
setDetail(int detail)
Sets the detail level of the result (the number of iteration steps per half-distance to 100%).
|
ResponseTimeHistogramReporter |
setExpectedValue(long expectedValue)
Sets the expectedValue value for the coordinated omission when the
ResponseTimeHistogramReporter.Correction.USER mode is set. |
ResponseTimeHistogramReporter |
setFilter(boolean filter)
Sets the state of results filter.
|
ResponseTimeHistogramReporter |
setMaxExpectedValue(long maxExpectedValue)
Sets the maximum expected value to better organize the data in the histogram.
|
ResponseTimeHistogramReporter |
setPrecision(int precision)
Sets the precision as the number of significant digits that are recognized by this reporter.
|
ResponseTimeHistogramReporter |
setPrefix(String prefix)
Sets the prefix of percentile values in the result map.
|
getDestinations, getReportingPeriods, newMeasurement, registerDestination, registerDestination, report, reset, setReportManager, setRunInfo, start, stop, unregisterDestination
public void publishResult(PeriodType periodType, Destination destination) throws ReportingException
Reporter
periodType
- A period type that caused the invocation of this method.destination
- A destination to which the result should be reported.ReportingException
- When it was not possible to publish results to the given destination.public int getPrecision()
public ResponseTimeHistogramReporter setPrecision(int precision)
precision
- The number of significant digits that are recognized by this reporter.public ResponseTimeHistogramReporter.Correction getCorrectionMode()
ResponseTimeHistogramReporter.Correction.AUTO
is the default value and this means that the histogram is corrected
by the average measured value. In case of the ResponseTimeHistogramReporter.Correction.USER
mode, the user specifies
the expected response time manually for correct computation of the histogram. When the
ResponseTimeHistogramReporter.Correction.OFF
mode is used, no correction is performed.public ResponseTimeHistogramReporter setCorrectionMode(ResponseTimeHistogramReporter.Correction correctionMode)
ResponseTimeHistogramReporter.Correction.AUTO
is the default value and this means that the histogram is corrected
by the average measured value. In case of the ResponseTimeHistogramReporter.Correction.USER
mode, the user specifies
the expected response time manually for correct computation of the histogram. When the
ResponseTimeHistogramReporter.Correction.OFF
mode is used, no correction is performed.correctionMode
- The expectedValue mode to be used.public long getExpectedValue()
ResponseTimeHistogramReporter.Correction.USER
mode is set.public ResponseTimeHistogramReporter setExpectedValue(long expectedValue)
ResponseTimeHistogramReporter.Correction.USER
mode is set.expectedValue
- The expectedValue value.public String getPrefix()
public ResponseTimeHistogramReporter setPrefix(String prefix)
prefix
- The percentile value prefix.public int getDetail()
public ResponseTimeHistogramReporter setDetail(int detail)
detail
- The detail level.public long getMaxExpectedValue()
public ResponseTimeHistogramReporter setMaxExpectedValue(long maxExpectedValue)
maxExpectedValue
- The maximal expected value. -1 to turn this optimization off. -1 is the default value.public boolean isFilter()
public ResponseTimeHistogramReporter setFilter(boolean filter)
filter
- The state of results filter. When true, the results with the same value are collapsed.Copyright © 2010–2017 PerfCake Community. All rights reserved.