Skip to content

Commit a02a94b

Browse files
committed
Ask confirmation to start benchmark
1 parent 29f5a83 commit a02a94b

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
@@ -773,18 +773,26 @@ impl Runnable for Job {
773773
)
774774
.await?;
775775

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

789797
if close_chains {
790798
info!("Closing chains...");

0 commit comments

Comments
 (0)