org.mpierce.metrics.reservoir:hdrhistogram-metrics-reservoir
A Metrics Reservoir implementation backed by HdrHistogram.
The artifacts are published to Bintray. If you're using gradle, use the jcenter()
repository and put this in your build.gradle
dependencies
block:
compile 'org.mpierce.metrics.reservoir:hdrhistogram-metrics-reservoir:THE_LATEST_RELEASED_VERSION'
Or, if you're on Maven, see the Set Me Up button at https://bintray.com/bintray/jcenter and then add the dependency.
Then, use the following reservoir implementations when you create your Histogram
or Timer
instances:
HdrHistogramReservoir
, a reservoir that accumulates its internal state foreverHdrHistogramResetOnSnapshotReservoir
, a reservoir that resets its internal state on each snapshot (which is how reporters get information from reservoirs). See this article for when that is useful.See http://hdrhistogram.org/ for why you want HdrHistogram as the underlying data structure, or watch Gil Tene talking about how latency is hard to measure well, or read this thread. The short version:
Also, check out some simple benchmarks of the various reservoir implementations.