diff --git a/linera-service/benches/transfers.rs b/linera-service/benches/transfers.rs index f17e23eed832..c4c500deda78 100644 --- a/linera-service/benches/transfers.rs +++ b/linera-service/benches/transfers.rs @@ -2,10 +2,7 @@ // SPDX-License-Identifier: Apache-2.0 use criterion::{criterion_group, criterion_main, Criterion}; -use futures::{ - stream::{self, FuturesUnordered}, - Stream, StreamExt, -}; +use futures::{stream::FuturesUnordered, Stream, StreamExt}; use linera_base::{ data_types::Amount, identifiers::{Account, ChainId, Owner}, @@ -20,10 +17,11 @@ fn cross_chain_native_token_transfers(criterion: &mut Criterion) { let chain_count = 100; let accounts_per_chain = 1; let transfers_per_account = 100; + let runtime = Runtime::new().expect("Failed to create Tokio runtime"); criterion.bench_function("same_chain_native_token_transfers", |bencher| { bencher - .to_async(Runtime::new().expect("Failed to create Tokio runtime")) + .to_async(&runtime) .iter_custom(|iterations| async move { let mut total_time = Duration::ZERO;