use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RuntimeMetricSetTest method uptime.
@Test
public void uptime() {
final LongGauge gauge = metricsRegistry.newLongGauge("runtime.uptime");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
double expected = ManagementFactory.getRuntimeMXBean().getUptime();
assertEquals(expected, gauge.read(), TimeUnit.MINUTES.toMillis(1));
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RuntimeMetricSetTest method totalMemory.
@Test
public void totalMemory() {
final LongGauge gauge = metricsRegistry.newLongGauge("runtime.totalMemory");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(runtime.totalMemory(), gauge.read(), TEN_MB);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class ThreadMetricSetTest method totalStartedThreadCount.
@Test
public void totalStartedThreadCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("thread.totalStartedThreadCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(MX_BEAN.getTotalStartedThreadCount(), gauge.read(), 10);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class ThreadMetricSetTest method daemonThreadCount.
@Test
public void daemonThreadCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("thread.daemonThreadCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(MX_BEAN.getDaemonThreadCount(), gauge.read(), 10);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class ThreadMetricSetTest method peakThreadCount.
@Test
public void peakThreadCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("thread.peakThreadCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(MX_BEAN.getPeakThreadCount(), gauge.read(), 10);
}
});
}
Aggregations