Search in sources :

Example 1 with JvmAttributeGaugeSet

use of io.dropwizard.metrics.JvmAttributeGaugeSet in project light-4j by networknt.

the class JvmAttributeGaugeSetTest method autoDiscoversTheRuntimeBean.

@Test
public void autoDiscoversTheRuntimeBean() throws Exception {
    final Gauge gauge = (Gauge) new JvmAttributeGaugeSet().getMetrics().get(MetricName.build("uptime"));
    assertThat((Long) gauge.getValue()).isPositive();
}
Also used : JvmAttributeGaugeSet(io.dropwizard.metrics.JvmAttributeGaugeSet) Gauge(io.dropwizard.metrics.Gauge) Test(org.junit.Test)

Aggregations

Gauge (io.dropwizard.metrics.Gauge)1 JvmAttributeGaugeSet (io.dropwizard.metrics.JvmAttributeGaugeSet)1 Test (org.junit.Test)1