use of com.hazelcast.internal.metrics.ProbeLevel.MANDATORY in project hazelcast by hazelcast.
the class LongGaugeImplTest method whenReregister.
@Test
public void whenReregister() {
metricsRegistry.registerStaticProbe(this, "foo", MANDATORY, (LongProbeFunction) o -> 10);
LongGauge gauge = metricsRegistry.newLongGauge("foo");
gauge.read();
metricsRegistry.registerStaticProbe(this, "foo", MANDATORY, (LongProbeFunction) o -> 11);
assertEquals(11, gauge.read());
}
use of com.hazelcast.internal.metrics.ProbeLevel.MANDATORY in project hazelcast by hazelcast.
the class DoubleGaugeImplTest method whenLongProbe.
@Test
public void whenLongProbe() {
metricsRegistry.registerStaticProbe(this, "foo", MANDATORY, (LongProbeFunction) o -> 10);
DoubleGauge gauge = metricsRegistry.newDoubleGauge("foo");
double actual = gauge.read();
assertEquals(10, actual, 0.1);
}
Aggregations