|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.LatencyUtils.LatencyStats
public class LatencyStats
LatencyStats objects are used to track the behavior of latencies recorded using recordLatency(long)).
Latency behavior can be examined using detailed interval and accumulated histograms
(see Histogram).
Recorded latencies are auto-corrected for experienced pauses by leveraging pause detectors and moving window
average interval estimators, compensating for coordinated omission.
| Nested Class Summary | |
|---|---|
static class |
LatencyStats.Builder
A fluent API builder class for creating LatencyStats objects. |
| Constructor Summary | |
|---|---|
LatencyStats()
Create a LatencyStats object with default settings: use the default pause detector (must be separately set using setDefaultPauseDetector(org.LatencyUtils.PauseDetector)), a default
histogram update interval (1 sec), a default histogram range and accuracy (1 usec to 1hr,
2 decimal points of accuracy), and a default moving window estimator (1024 entry moving window, time capped at
10 seconds). |
|
LatencyStats(long lowestTrackableLatency,
long highestTrackableLatency,
int numberOfSignificantValueDigits,
long histogramUpdateInterval,
int numberOfRecentHistogramIntervalsToTrack,
int intervalEstimatorWindowLength,
long intervalEstimatorTimeCap,
PauseDetector pauseDetector)
|
|
| Method Summary | |
|---|---|
void |
addAccumulatedHistogramTo(org.HdrHistogram.Histogram toHistogram)
Add the values of the accumulated latency histogram to the given histogram |
void |
addIntervalHistogramTo(org.HdrHistogram.Histogram toHistogram)
Add the values of the latest interval latency histogram to the given histogram |
void |
forceIntervalUpdate()
Force an update of the interval and accumulated histograms from the current recorded data. |
org.HdrHistogram.Histogram |
getAccumulatedHistogram()
Get a copy of the accumulated latency histogram: |
void |
getAccumulatedHistogramInto(org.HdrHistogram.Histogram targetHistogram)
Place a copy of the accumulated latency histogram's values into the given histogram |
IntervalEstimator |
getIntervalEstimator()
get the IntervalEstimator used by this LatencyStats object |
org.HdrHistogram.Histogram |
getIntervalHistogram()
Get a copy of the latest interval latency histogram: |
void |
getIntervalHistogramInto(org.HdrHistogram.Histogram targetHistogram)
Place a copy of the latest interval latency histogram's values into the given histogram |
PauseDetector |
getPauseDetector()
get the PauseDetector used by this LatencyStats object |
org.HdrHistogram.Histogram |
getUncorrectedAccumulatedHistogram()
Get a copy of the uncorrected accumulated latency histogram (values will not include corrections for detected pauses) |
org.HdrHistogram.Histogram |
getUncorrectedIntervalHistogram()
Get a copy of the uncorrected latest interval latency histogram (values will not include corrections for detected pauses) |
void |
recordLatency(long latency)
Record a latency value in the LatencyStats object |
void |
resetAccumulatedHistogram()
Reset the contents of the accumulated histogram |
static void |
setDefaultPauseDetector(PauseDetector pauseDetector)
Set the default pause detector for the LatencyStats class. |
void |
stop()
Stop operation of this LatencyStats object, removing it from the pause detector's notification list |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public LatencyStats()
setDefaultPauseDetector(org.LatencyUtils.PauseDetector)), a default
histogram update interval (1 sec), a default histogram range and accuracy (1 usec to 1hr,
2 decimal points of accuracy), and a default moving window estimator (1024 entry moving window, time capped at
10 seconds).
public LatencyStats(long lowestTrackableLatency,
long highestTrackableLatency,
int numberOfSignificantValueDigits,
long histogramUpdateInterval,
int numberOfRecentHistogramIntervalsToTrack,
int intervalEstimatorWindowLength,
long intervalEstimatorTimeCap,
PauseDetector pauseDetector)
lowestTrackableLatency - Lowest trackable latency in latency histogramshighestTrackableLatency - Highest trackable latency in latency histogramsnumberOfSignificantValueDigits - Number of significant [decimal] digits of accuracy in latency histogramshistogramUpdateInterval - The length (in nanoseconds) of the automatically updating time interval.numberOfRecentHistogramIntervalsToTrack - Number of recent intervalEndTimes to trackintervalEstimatorWindowLength - Length of window in moving window interval estimatorintervalEstimatorTimeCap - Time cap (in nanoseconds) of window in moving window interval estimatorpauseDetector - The pause detector to use for identifying and correcting for pauses| Method Detail |
|---|
public static void setDefaultPauseDetector(PauseDetector pauseDetector)
pauseDetector - the pause detector to use as a default when no explicit pause detector is providedpublic void recordLatency(long latency)
latency - latency value (in nanoseconds) to recordpublic org.HdrHistogram.Histogram getAccumulatedHistogram()
public void getAccumulatedHistogramInto(org.HdrHistogram.Histogram targetHistogram)
targetHistogram - the histogram into which the accumulated histogram's data should be copiedpublic void addAccumulatedHistogramTo(org.HdrHistogram.Histogram toHistogram)
toHistogram - the histogram into which the accumulated histogram's data should be addedpublic org.HdrHistogram.Histogram getUncorrectedAccumulatedHistogram()
public org.HdrHistogram.Histogram getIntervalHistogram()
public void getIntervalHistogramInto(org.HdrHistogram.Histogram targetHistogram)
targetHistogram - the histogram into which the interval histogram's data should be copiedpublic void addIntervalHistogramTo(org.HdrHistogram.Histogram toHistogram)
toHistogram - the histogram into which the interval histogram's data should be addedpublic org.HdrHistogram.Histogram getUncorrectedIntervalHistogram()
public void forceIntervalUpdate()
forceIntervalUpdate() provides the only means
by which intervalEndTimes are updated.
public void resetAccumulatedHistogram()
public void stop()
public IntervalEstimator getIntervalEstimator()
public PauseDetector getPauseDetector()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||