public interface GaugeDoubleMetric extends Metric
A GaugeDoubleMetric is created by MetricManager.register(MetricName, GaugeDouble)
.
Example:
class FreeMemoryGauge implements GaugeDouble {
public double getValue() {
return mxBean.getFreeMemory() / mxBean.getTotalMemory();
}
}
GaugeDoubleMetric gauge = MetricManager.register("jvm.memory.pctfree", freeMemoryGauge);
Note that avaje-metric-core registers some core JVM gauges that include threads, memory and garbage collection.
Modifier and Type | Method and Description |
---|---|
double |
getValue()
Return the value.
|
clearStatistics, collectStatistics, getName, visit
Copyright © 2014. All Rights Reserved.