public class NoopMetricsSystem extends Object implements MetricsSystem
MetricsSystem implementation which does nothing. Returns Metric implementations
which also does nothing (avoiding null instances).| Modifier and Type | Method and Description |
|---|---|
Counter |
getCounter(String name)
Get or construct a
Counter used to track a mutable number. |
Histogram |
getHistogram(String name)
Get or construct a
Histogram used to measure a distribution of values. |
static NoopMetricsSystem |
getInstance() |
Meter |
getMeter(String name)
|
Timer |
getTimer(String name)
Get or construct a
Timer used to measure durations and report rates. |
<T> void |
register(String name,
Gauge<T> gauge)
Register a
Gauge. |
public static NoopMetricsSystem getInstance()
NoopMetricsSystem instance.public Timer getTimer(String name)
MetricsSystemTimer used to measure durations and report rates.getTimer in interface MetricsSystemname - The name of the Timer.Timer.public Histogram getHistogram(String name)
MetricsSystemHistogram used to measure a distribution of values.getHistogram in interface MetricsSystemname - The name of the Histogram.Histogram.public Meter getMeter(String name)
MetricsSystemMeter used to measure durations and report distributions (a
combination of a Timer and a Histogram.getMeter in interface MetricsSystemname - The name of the Meter.Meter.public Counter getCounter(String name)
MetricsSystemCounter used to track a mutable number.getCounter in interface MetricsSystemname - The name of the CounterCounter.public <T> void register(String name, Gauge<T> gauge)
MetricsSystemGauge. The Gauge will be invoked at a period defined by the implementation
of MetricsSystem.register in interface MetricsSystemT - The type of the Gauge.name - The name of the Gauge.gauge - A callback to compute the current value.Copyright © 2012-2025 Apache Software Foundation. All Rights Reserved.