Search in sources :

Example 1 with IntMetricImpl

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

the class MetricsSelfTest method testIntCounter.

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

Aggregations

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