MCPcopy Create free account
hub / github.com/e2wugui/zeze / randomSnapshotTimer

Method randomSnapshotTimer

ZezeJava/ZezeJava/src/main/java/Zeze/Raft/Test.java:272–282  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

270 }
271
272 private void randomSnapshotTimer() throws Exception {
273 var randIndex = Random.getInstance().nextInt(rafts.size());
274 var index = 0;
275 for (var test : rafts.values()) {
276 if (index++ == randIndex) {
277 if (test.raft != null)
278 test.raft.getLogSequence().snapshot();
279 return;
280 }
281 }
282 }
283
284 public void runTrace() throws Exception {
285 // 基本测试

Callers

nothing calls this directly

Calls 6

getInstanceMethod · 0.95
getLogSequenceMethod · 0.80
sizeMethod · 0.65
valuesMethod · 0.65
nextIntMethod · 0.45
snapshotMethod · 0.45

Tested by

no test coverage detected