use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method unknownTime.
@Test
public void unknownTime() {
final LongGauge gauge = metricsRegistry.newLongGauge("gc.unknownTime");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
gcStats.run();
assertEquals(gcStats.unknownTime, gauge.read(), SECONDS.toMillis(1));
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class GarbageCollectionMetricSetTest method majorCount.
@Test
public void majorCount() {
final LongGauge gauge = metricsRegistry.newLongGauge("gc.majorCount");
assertTrueEventually(new AssertTask() {
@Override
public void run() throws Exception {
gcStats.run();
assertEquals(gcStats.majorCount, gauge.read(), 1);
}
});
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RegisterAnnotatedMethodsTest method register_withCustomName.
@Test
public void register_withCustomName() {
GaugeMethodWithName object = new GaugeMethodWithName();
metricsRegistry.scanAndRegister(object, "foo");
LongGauge gauge = metricsRegistry.newLongGauge("foo.mymethod");
assertEquals(10, gauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RegisterAnnotatedMethodsTest method register_map.
@Test
public void register_map() {
MapMethod object = new MapMethod();
metricsRegistry.scanAndRegister(object, "foo");
LongGauge gauge = metricsRegistry.newLongGauge("foo.method");
assertEquals(object.method().size(), gauge.read());
}
use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.
the class RegisterAnnotatedMethodsTest method register_collection.
@Test
public void register_collection() {
CollectionMethod object = new CollectionMethod();
metricsRegistry.scanAndRegister(object, "foo");
LongGauge gauge = metricsRegistry.newLongGauge("foo.method");
assertEquals(object.method().size(), gauge.read());
}
Aggregations