public interface GaugeLongMetric extends Metric
A GaugeLongMetric is created by MetricManager.register(MetricName, GaugeLong)
.
Example:
class ThreadCountGauge implements GaugeLong {
public long getValue() {
return threadMXBean.getThreadCount();
}
}
GaugeLongMetric gauge = MetricManager.register("jvm.thread.count", threadCountGauge);
Note that avaje-metric-core registers some core JVM gauges that include threads, memory and garbage collection.
Modifier and Type | Method and Description |
---|---|
long |
getValue()
Return the value.
|
clearStatistics, collectStatistics, getName, visit
Copyright © 2014. All Rights Reserved.