Skip to content

Commit e4dfb8f

Browse files
committed
Ask confirmation to start benchmark
1 parent c940ad5 commit e4dfb8f

File tree

1 file changed

+20
-12
lines changed

1 file changed

+20
-12
lines changed

linera-service/src/linera/main.rs

Lines changed: 20 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -771,18 +771,26 @@ impl Runnable for Job {
771771
)
772772
.await?;
773773

774-
linera_client::benchmark::Benchmark::<S>::run_benchmark(
775-
num_chains,
776-
transactions_per_block,
777-
bps,
778-
chain_clients.clone(),
779-
epoch,
780-
blocks_infos,
781-
committee,
782-
context.client.local_node().clone(),
783-
health_check_endpoints,
784-
)
785-
.await?;
774+
info!("Ready to start benchmark. Say 'yes' when you want to proceed. Only 'yes' will be accepted");
775+
if std::io::stdin()
776+
.lines()
777+
.next()
778+
.unwrap()?
779+
.eq_ignore_ascii_case("yes")
780+
{
781+
linera_client::benchmark::Benchmark::<S>::run_benchmark(
782+
num_chains,
783+
transactions_per_block,
784+
bps,
785+
chain_clients.clone(),
786+
epoch,
787+
blocks_infos,
788+
committee,
789+
context.client.local_node().clone(),
790+
health_check_endpoints,
791+
)
792+
.await?;
793+
}
786794

787795
if close_chains {
788796
info!("Closing chains...");

0 commit comments

Comments
 (0)