use of com.hazelcast.internal.metrics.LongProbeFunction in project hazelcast by hazelcast.
the class MetricsRegistryImplTest method modCount.
@Test
public void modCount() {
long modCount = metricsRegistry.modCount();
metricsRegistry.register(this, "foo", ProbeLevel.MANDATORY, new LongProbeFunction() {
@Override
public long get(Object obj) throws Exception {
return 1;
}
});
assertEquals(modCount + 1, metricsRegistry.modCount());
metricsRegistry.deregister(this);
assertEquals(modCount + 2, metricsRegistry.modCount());
}
Aggregations