Skip to content

Commit

Permalink
[smoke-test] further enhance progress metrics
Browse files Browse the repository at this point in the history
  • Loading branch information
Zekun Li authored and zekun000 committed Jun 14, 2024
1 parent 9402778 commit 5dbd02a
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions testsuite/forge/src/test_utils/consensus_utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -99,14 +99,11 @@ pub async fn test_consensus_fault_tolerance(

let cur = get_all_states(&validator_clients).await;

let epochs = cur.iter().map(|s| s.epoch).max().unwrap()
- previous.iter().map(|s| s.epoch).max().unwrap();
let rounds = cur
.iter()
.map(|s| s.round)
.max()
.unwrap()
.saturating_sub(previous.iter().map(|s| s.round).max().unwrap());
let (cur_epoch, cur_round) = cur.iter().map(|s| (s.epoch, s.round)).max().unwrap();
let (prev_epoch, prev_round) = previous.iter().map(|s| (s.epoch, s.round)).max().unwrap();
let epochs = cur_epoch.saturating_sub(prev_epoch);
let rounds = cur_round.saturating_sub(prev_round);

let transactions = cur.iter().map(|s| s.version).max().unwrap()
- previous.iter().map(|s| s.version).max().unwrap();

Expand Down

0 comments on commit 5dbd02a

Please sign in to comment.