Class HistoStatsLogger
java.lang.Object
io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
io.nosqlbench.nb.api.components.core.NBBaseComponent
io.nosqlbench.nb.api.engine.metrics.CapabilityHook<HdrDeltaHistogramAttachment>
io.nosqlbench.nb.api.engine.metrics.HistoStatsLogger
- All Implemented Interfaces:
com.codahale.metrics.MetricRegistryListener,NBComponent,NBComponentAdvisors,NBComponentEvents,NBComponentMetrics,NBComponentProps,NBComponentServices,NBComponentTimeline,NBProviderSearch,NBTokenWords,MetricsCloseable,NBLabeledElement,AutoCloseable,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.BaseNested classes/interfaces inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
NBLabeledElement.BasicLabeledElement -
Field Summary
Fields inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
bufferOrphanedMetrics, closed_ns, error, errored_ns, labels, metricsBuffer, parent, started_epoch_ms, started_ns, state, teardown_nsFields inherited from interface io.nosqlbench.nb.api.components.core.NBComponent
EMPTY_COMPONENTFields inherited from interface io.nosqlbench.nb.api.components.core.NBComponentProps
HDRDIGITS, SUMMARYFields inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
EMPTY -
Constructor Summary
ConstructorsConstructorDescriptionHistoStatsLogger(NBComponent parent, String sessionName, File file, Pattern pattern, long intervalLength, TimeUnit timeUnit) -
Method Summary
Modifier and TypeMethodDescriptionvoidprotected 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.nb.api.engine.metrics.CapabilityHook
onCounterAdded, onCounterRemoved, onGaugeAdded, onGaugeRemoved, onHistogramAdded, onHistogramRemoved, onMeterAdded, onMeterRemoved, onTimerAdded, onTimerRemovedMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponent
addAdvisor, addMetricsCloseable, attachChild, beforeDetach, close, create, detachChild, find, findParentService, getAdvisors, getChildren, getComponentOnlyLabels, getComponentProp, getComponentState, getLabels, getNanosSinceStart, getParent, getTokens, nanosof_close, nanosof_error, nanosof_start, nanosof_teardown, onError, onEvent, reportExecutionMetric, setComponentProp, started_epoch_ms, teardownMethods inherited from class io.nosqlbench.nb.api.components.core.NBBaseComponentMetrics
addComponentMetric, addListener, findComponentMetrics, findComponentMetrics, getComponentMetric, getComponentMetrics, removeListenerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentAdvisors
getAdvisorResultsMethods inherited from interface io.nosqlbench.nb.api.components.core.NBComponentMetrics
addComponentMetric, findComponentMetrics, findComponentMetrics, findOneComponentMetric, findOneComponentMetric, getComponentMetric, getComponentMetricsMethods inherited from interface io.nosqlbench.nb.api.labels.NBLabeledElement
description
-
Constructor Details
-
HistoStatsLogger
public HistoStatsLogger(NBComponent parent, String sessionName, File file, Pattern pattern, long intervalLength, TimeUnit timeUnit)
-
-
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
- Overrides:
toStringin classNBBaseComponent
-
getInterval
public long getInterval() -
onCapableAdded
- Specified by:
onCapableAddedin classCapabilityHook<HdrDeltaHistogramAttachment>
-
onCapableRemoved
- Specified by:
onCapableRemovedin classCapabilityHook<HdrDeltaHistogramAttachment>
-
getCapabilityClass
- Specified by:
getCapabilityClassin classCapabilityHook<HdrDeltaHistogramAttachment>
-
run
-
closeMetrics
public void closeMetrics()- Specified by:
closeMetricsin interfaceMetricsCloseable
-