Search in sources :

Example 1 with RatisMetrics

use of org.apache.ratis.metrics.RatisMetrics in project incubator-ratis by apache.

the class TestRaftLogMetrics method assertCommitCount.

static void assertCommitCount(RaftServer.Division server, int expectedMsgs) {
    final RatisMetricRegistry rlm = ((RatisMetrics) server.getRaftLog().getRaftLogMetrics()).getRegistry();
    long stmCount = rlm.counter(STATE_MACHINE_LOG_ENTRY_COUNT).getCount();
    Assert.assertEquals(expectedMsgs, stmCount);
}
Also used : RatisMetrics(org.apache.ratis.metrics.RatisMetrics) RatisMetricRegistry(org.apache.ratis.metrics.RatisMetricRegistry)

Aggregations

RatisMetricRegistry (org.apache.ratis.metrics.RatisMetricRegistry)1 RatisMetrics (org.apache.ratis.metrics.RatisMetrics)1