use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method minorTime.
@Test
public void minorTime() throws InterruptedException {
final LongGauge gauge = metricsRegistry.newLongGauge("gc.minorTime");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
gcStats.run();
assertEquals(gcStats.minorTime, gauge.read(), SECONDS.toMillis(1));
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RuntimeMetricSetTest method availableProcessors.
@Test
public void availableProcessors() {
LongGauge gauge = metricsRegistry.newLongGauge("runtime.availableProcessors");
assertEquals(runtime.availableProcessors(), gauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RuntimeMetricSetTest method maxMemory.
@Test
public void maxMemory() {
final LongGauge gauge = metricsRegistry.newLongGauge("runtime.maxMemory");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(runtime.maxMemory(), gauge.read(), TEN_MB);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class ThreadMetricSetTest method threadCount.
@Test
public void threadCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("thread.threadCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(MX_BEAN.getThreadCount(), gauge.read(), 10);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class ClassLoadingMetricSetTest method totalLoadedClassesCount.
@Test
public void totalLoadedClassesCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("classloading.totalLoadedClassesCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
assertEquals(BEAN.getTotalLoadedClassCount(), gauge.read(), 100);
}
});
}
Aggregations