fix(pagebench): #6325 broke running without --runtime (#6351)

After PR #6325, when running without --runtime, we wouldn't wait for
start_work_barrier, causing the benchmark to not start at all.
This commit is contained in:
Christian Schwarz
2024-01-15 09:54:19 +01:00
committed by GitHub
parent 31a4eb40b2
commit 0e1ef3713e

View File

@@ -349,10 +349,10 @@ async fn main_impl(
let work_sender_task = tokio::spawn(work_sender);
info!("waiting for everything to become ready");
start_work_barrier.wait().await;
info!("work started");
if let Some(runtime) = args.runtime {
info!("waiting for everything to become ready");
start_work_barrier.wait().await;
info!("work started");
tokio::time::sleep(runtime.into()).await;
info!("runtime over, signalling cancellation");
cancel.cancel();