Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Test
- public void myTest() {
- FailureDetector fd = new FailureDetector(null, 1, 1000, "normal");
- int from = 0;
- int to = 100;
- for (int i=from;i<to;i++) {
- fd.recordHeartbeat(i);
- }
- double threshold = new GossipSettings().getConvictThreshold();
- double measure = fd.computePhiMeasure(to+2000);
- log.info(threshold);
- log.info(measure);
- if (measure > threshold) {
- log.info("DOWN");
- } else {
- log.info("UP");
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement