diff --git a/pageserver/benches/bench_walredo.rs b/pageserver/benches/bench_walredo.rs index 0d0e940bd5..68902b991b 100644 --- a/pageserver/benches/bench_walredo.rs +++ b/pageserver/benches/bench_walredo.rs @@ -125,11 +125,13 @@ fn bench_impl(redo_work: Arc, n_redos: u64, nclients: u64) -> Duration }); } - let mut total_wallclock_time = std::time::Duration::from_millis(0); - while let Some(res) = rt.block_on(tasks.join_next()) { - total_wallclock_time += res.unwrap(); - } - total_wallclock_time + rt.block_on(async move { + let mut total_wallclock_time = std::time::Duration::from_millis(0); + while let Some(res) = tasks.join_next().await { + total_wallclock_time += res.unwrap(); + } + total_wallclock_time + }) } async fn client(