Package io.engineblock.metrics
Class NicerTimer
- java.lang.Object
-
- com.codahale.metrics.Timer
-
- io.engineblock.metrics.NicerTimer
-
- All Implemented Interfaces:
com.codahale.metrics.Counting,com.codahale.metrics.Metered,com.codahale.metrics.Metric,com.codahale.metrics.Sampling,DeltaSnapshotter,HdrDeltaHistogramAttachment,HdrDeltaHistogramProvider,TimerAttachment
public class NicerTimer extends com.codahale.metrics.Timer implements DeltaSnapshotter, HdrDeltaHistogramAttachment, TimerAttachment
-
-
Constructor Summary
Constructors Constructor Description NicerTimer(java.lang.String metricName, DeltaHdrHistogramReservoir deltaHdrHistogramReservoir)
-
Method Summary
Modifier and Type Method Description NicerTimerattachHdrDeltaHistogram()Attach a metric.com.codahale.metrics.TimerattachTimer(com.codahale.metrics.Timer timer)DeltaSnapshotReadergetDeltaReader()ConvenientSnapshotgetDeltaSnapshot(long cacheTimeMillis)org.HdrHistogram.HistogramgetNextHdrDeltaHistogram()Create a new interval histogram from the current data, then reset the histogram reservoir.ConvenientSnapshotgetSnapshot()voidupdate(long duration, java.util.concurrent.TimeUnit unit)
-
-
-
Constructor Detail
-
NicerTimer
public NicerTimer(java.lang.String metricName, DeltaHdrHistogramReservoir deltaHdrHistogramReservoir)
-
-
Method Detail
-
getSnapshot
public ConvenientSnapshot getSnapshot()
- Specified by:
getSnapshotin interfacecom.codahale.metrics.Sampling- Overrides:
getSnapshotin classcom.codahale.metrics.Timer
-
getDeltaReader
public DeltaSnapshotReader getDeltaReader()
- Specified by:
getDeltaReaderin interfaceDeltaSnapshotter
-
getDeltaSnapshot
public ConvenientSnapshot getDeltaSnapshot(long cacheTimeMillis)
- Specified by:
getDeltaSnapshotin interfaceDeltaSnapshotter
-
attachHdrDeltaHistogram
public NicerTimer attachHdrDeltaHistogram()
Description copied from interface:HdrDeltaHistogramAttachmentAttach a metric.- Specified by:
attachHdrDeltaHistogramin interfaceHdrDeltaHistogramAttachment- Returns:
- the attached metric, after adding to the mirrors for the metric.
-
attachTimer
public com.codahale.metrics.Timer attachTimer(com.codahale.metrics.Timer timer)
- Specified by:
attachTimerin interfaceTimerAttachment
-
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
-
update
public void update(long duration, java.util.concurrent.TimeUnit unit)- Overrides:
updatein classcom.codahale.metrics.Timer
-
-