Search in sources :

Example 51 with LongGauge

use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.

the class RegisterAnnotatedMethodsTest method register_superclassWithGaugeMethods.

@Test
public void register_superclassWithGaugeMethods() {
    SubclassWithGauges object = new SubclassWithGauges();
    metricsRegistry.scanAndRegister(object, "foo");
    LongGauge methodGauge = metricsRegistry.newLongGauge("foo.method");
    assertEquals(object.method(), methodGauge.read());
    LongGauge fieldGauge = metricsRegistry.newLongGauge("foo.field");
    assertEquals(object.field, fieldGauge.read());
}
Also used : LongGauge(com.hazelcast.internal.metrics.LongGauge) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 52 with LongGauge

use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.

the class RegisterAnnotatedMethodsTest method register_primitiveByte.

@Test
public void register_primitiveByte() {
    PrimitiveByteMethod object = new PrimitiveByteMethod();
    metricsRegistry.scanAndRegister(object, "foo");
    LongGauge gauge = metricsRegistry.newLongGauge("foo.method");
    assertEquals(object.method(), gauge.read());
}
Also used : LongGauge(com.hazelcast.internal.metrics.LongGauge) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Example 53 with LongGauge

use of com.hazelcast.internal.metrics.LongGauge in project hazelcast by hazelcast.

the class RegisterAnnotatedMethodsTest method register_subclass.

@Test
public void register_subclass() {
    SubclassMethod object = new SubclassMethod();
    metricsRegistry.scanAndRegister(object, "foo");
    LongGauge gauge = metricsRegistry.newLongGauge("foo.method");
    assertEquals(object.method().size(), gauge.read());
}
Also used : LongGauge(com.hazelcast.internal.metrics.LongGauge) QuickTest(com.hazelcast.test.annotation.QuickTest) Test(org.junit.Test)

Aggregations

LongGauge (com.hazelcast.internal.metrics.LongGauge)53 QuickTest (com.hazelcast.test.annotation.QuickTest)53 Test (org.junit.Test)53 AssertTask (com.hazelcast.test.AssertTask)18 LongProbeFunction (com.hazelcast.internal.metrics.LongProbeFunction)3 File (java.io.File)3 MetricsRegistryImpl (com.hazelcast.internal.metrics.impl.MetricsRegistryImpl)1 ParallelTest (com.hazelcast.test.annotation.ParallelTest)1