Skip to content

Commit

Permalink
fix bench
Browse files Browse the repository at this point in the history
Signed-off-by: Andy Lok <[email protected]>
  • Loading branch information
andylokandy committed Sep 19, 2023
1 parent 665d988 commit 8887bb4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion minitrace/benches/spsc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,11 @@ fn spsc_comparison(c: &mut Criterion) {
});

for _ in 0..len {
while rx.try_recv().is_err() {}
loop {
if let Ok(_) = rx.try_recv() {
break;
}
}
}

total_time += start.elapsed();
Expand Down

0 comments on commit 8887bb4

Please sign in to comment.