Search in sources :

Example 1 with DoubleMetricImpl

use of org.apache.ignite.internal.processors.metric.impl.DoubleMetricImpl in project ignite by apache.

the class MetricsSelfTest method testDoubleCounter.

/**
 */
@Test
public void testDoubleCounter() throws Exception {
    DoubleMetricImpl l = mreg.doubleMetric("dtest", "test");
    run(() -> l.add(1), 100);
    assertEquals(100 * 100f, l.value(), .000001);
    l.reset();
    assertEquals(0, l.value(), .000001);
}
Also used : DoubleMetricImpl(org.apache.ignite.internal.processors.metric.impl.DoubleMetricImpl) GridCommonAbstractTest(org.apache.ignite.testframework.junits.common.GridCommonAbstractTest) Test(org.junit.Test)

Aggregations

DoubleMetricImpl (org.apache.ignite.internal.processors.metric.impl.DoubleMetricImpl)1 GridCommonAbstractTest (org.apache.ignite.testframework.junits.common.GridCommonAbstractTest)1 Test (org.junit.Test)1