use separate rpc clients per task

This commit is contained in:
Maximilian Schneider 2023-05-14 20:13:07 +02:00
parent ec24103f2a
commit 60393d3784
1 changed files with 1 additions and 2 deletions

View File

@ -18,10 +18,9 @@ pub struct Bencher;
impl Bencher {
pub async fn bench<B: BenchFn>(args: Args) -> anyhow::Result<Metric> {
let rpc_client = args.get_rpc_client();
let futs = (0..args.threads).map(|_| {
let rpc_client = rpc_client.clone();
let rpc_client = args.get_rpc_client();
let duration = args.get_duration_to_run_test();
tokio::spawn(async move {