Package io.nosqlbench.api.engine.metrics
Class HistoStatsLogger
java.lang.Object
io.nosqlbench.api.engine.metrics.CapabilityHook<HdrDeltaHistogramAttachment>
io.nosqlbench.api.engine.metrics.HistoStatsLogger
- All Implemented Interfaces:
com.codahale.metrics.MetricRegistryListener,MetricsCloseable,Runnable,EventListener
public class HistoStatsLogger
extends CapabilityHook<HdrDeltaHistogramAttachment>
implements Runnable, MetricsCloseable
HistoIntervalLogger runs a separate thread to snapshotAndWrite encoded histograms on a regular interval.
It listens to the metrics registry for any new metrics that match the pattern. Any metrics
which both match the pattern and which are
EncodableHistograms are written the configured
logfile at the configured interval.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.codahale.metrics.MetricRegistryListener
com.codahale.metrics.MetricRegistryListener.Base -
Constructor Summary
ConstructorsConstructorDescriptionHistoStatsLogger(String sessionName, File file, Pattern pattern, long intervalLength, TimeUnit timeUnit) -
Method Summary
Modifier and TypeMethodDescriptionvoidchart()voidprotected Class<HdrDeltaHistogramAttachment>longbooleanvoidonCapableAdded(String name, HdrDeltaHistogramAttachment chainedHistogram) voidonCapableRemoved(String name, HdrDeltaHistogramAttachment capable) voidrun()voidBy convention, it is typical for the logging application to use a comment to indicate the logging application at the head of the log, followed by the log format version, a startLogging time, and a legend (in that order).toString()Methods inherited from class io.nosqlbench.api.engine.metrics.CapabilityHook
onCounterAdded, onCounterRemoved, onGaugeAdded, onGaugeRemoved, onHistogramAdded, onHistogramRemoved, onMeterAdded, onMeterRemoved, onTimerAdded, onTimerRemoved
-
Constructor Details
-
HistoStatsLogger
-
-
Method Details
-
matches
-
startLogging
public void startLogging()By convention, it is typical for the logging application to use a comment to indicate the logging application at the head of the log, followed by the log format version, a startLogging time, and a legend (in that order). -
toString
-
getInterval
public long getInterval() -
onCapableAdded
- Specified by:
onCapableAddedin classCapabilityHook<HdrDeltaHistogramAttachment>
-
onCapableRemoved
- Specified by:
onCapableRemovedin classCapabilityHook<HdrDeltaHistogramAttachment>
-
getCapabilityClass
- Specified by:
getCapabilityClassin classCapabilityHook<HdrDeltaHistogramAttachment>
-
run
public void run() -
closeMetrics
public void closeMetrics()- Specified by:
closeMetricsin interfaceMetricsCloseable
-
chart
public void chart()- Specified by:
chartin interfaceMetricsCloseable
-