Interface MetricsSystem
- All Known Implementing Classes:
NoopMetricsSystem
public interface MetricsSystem
General purpose factory for creating various metrics. Modeled off of the Dropwizard Metrics API.
-
Method Summary
Modifier and TypeMethodDescriptiongetCounter(String name) Get or construct aCounterused to track a mutable number.getHistogram(String name) Get or construct aHistogramused to measure a distribution of values.Get or construct aTimerused to measure durations and report rates.<T> voidRegister aGauge.
-
Method Details
-
getTimer
Get or construct aTimerused to measure durations and report rates.- Parameters:
name- The name of the Timer.- Returns:
- An instance of
Timer.
-
getHistogram
Get or construct aHistogramused to measure a distribution of values.- Parameters:
name- The name of the Histogram.- Returns:
- An instance of
Histogram.
-
getMeter
Get or construct aMeterused to measure durations and report distributions (a combination of aTimerand aHistogram.- Parameters:
name- The name of the Meter.- Returns:
- An instance of
Meter.
-
getCounter
Get or construct aCounterused to track a mutable number.- Parameters:
name- The name of the Counter- Returns:
- An instance of
Counter.
-
register
Register aGauge. The Gauge will be invoked at a period defined by the implementation ofMetricsSystem.- Type Parameters:
T- The type of the Gauge.- Parameters:
name- The name of the Gauge.gauge- A callback to compute the current value.
-