Package io.nosqlbench.engine.api.metrics
Class NicerHistogram
java.lang.Object
com.codahale.metrics.Histogram
io.nosqlbench.engine.api.metrics.NicerHistogram
- All Implemented Interfaces:
com.codahale.metrics.Counting,com.codahale.metrics.Metric,com.codahale.metrics.Sampling,DeltaSnapshotter,HdrDeltaHistogramAttachment,HdrDeltaHistogramProvider,HistogramAttachment
public class NicerHistogram extends com.codahale.metrics.Histogram implements DeltaSnapshotter, HdrDeltaHistogramAttachment, HistogramAttachment
-
Constructor Summary
Constructors Constructor Description NicerHistogram(java.lang.String metricName, DeltaHdrHistogramReservoir hdrHistogramReservoir) -
Method Summary
Modifier and Type Method Description NicerHistogramattachHdrDeltaHistogram()Attach a metric.com.codahale.metrics.HistogramattachHistogram(com.codahale.metrics.Histogram histogram)DeltaSnapshotReadergetDeltaReader()ConvenientSnapshotgetDeltaSnapshot(long cacheTimeMillis)org.HdrHistogram.HistogramgetNextHdrDeltaHistogram()Create a new interval histogram from the current data, then reset the histogram reservoir.ConvenientSnapshotgetSnapshot()Only return a new snapshot form current reservoir data if the cached one has expired.voidupdate(long value)
-
Constructor Details
-
NicerHistogram
public NicerHistogram(java.lang.String metricName, DeltaHdrHistogramReservoir hdrHistogramReservoir)
-
-
Method Details
-
getDeltaReader
- Specified by:
getDeltaReaderin interfaceDeltaSnapshotter
-
getSnapshot
Only return a new snapshot form current reservoir data if the cached one has expired.- Specified by:
getSnapshotin interfacecom.codahale.metrics.Sampling- Overrides:
getSnapshotin classcom.codahale.metrics.Histogram- Returns:
- a new delta snapshot, or the cached one
-
getDeltaSnapshot
- Specified by:
getDeltaSnapshotin interfaceDeltaSnapshotter
-
attachHdrDeltaHistogram
Description copied from interface:HdrDeltaHistogramAttachmentAttach a metric.- Specified by:
attachHdrDeltaHistogramin interfaceHdrDeltaHistogramAttachment- Returns:
- the attached metric, after adding to the mirrors for the metric.
-
attachHistogram
public com.codahale.metrics.Histogram attachHistogram(com.codahale.metrics.Histogram histogram)- Specified by:
attachHistogramin interfaceHistogramAttachment
-
update
public void update(long value)- Overrides:
updatein classcom.codahale.metrics.Histogram
-
getNextHdrDeltaHistogram
public org.HdrHistogram.Histogram getNextHdrDeltaHistogram()Description copied from interface:HdrDeltaHistogramProviderCreate a new interval histogram from the current data, then reset the histogram reservoir.- Specified by:
getNextHdrDeltaHistogramin interfaceHdrDeltaHistogramProvider- Returns:
- the new interval histogram
-