use of org.apache.ratis.server.metrics.LogAppenderMetrics in project incubator-ratis by apache.
the class TestLogAppenderMetrics method setup.
@Before
public void setup() {
RaftGroupId raftGroupId = RaftGroupId.randomId();
raftPeerId = RaftPeerId.valueOf("TestId");
RaftGroupMemberId raftGroupMemberId = RaftGroupMemberId.valueOf(raftPeerId, raftGroupId);
followerInfo = new MyFollowerInfo(100L);
LogAppenderMetrics logAppenderMetrics = new LogAppenderMetrics(raftGroupMemberId);
ratisMetricRegistry = logAppenderMetrics.getRegistry();
logAppenderMetrics.addFollowerGauges(raftPeerId, followerInfo::getNextIndex, followerInfo::getMatchIndex, followerInfo::getLastRpcTime);
}
Aggregations