From dd2a33f3d7ad8c5be0cf4666610efe8106da87c0 Mon Sep 17 00:00:00 2001 From: Simeon Romanov Date: Sat, 16 Dec 2023 15:03:42 +0300 Subject: [PATCH] post review fixes --- .github/workflows/build.yml | 5 +++++ src/benchmark/bin.rs | 5 ++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 841aa06e89..6a898562fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -29,6 +29,11 @@ jobs: with: command: build args: --features async-io-rio + - name: Build benchmarks + uses: actions-rs/toolchain@v1 + with: + command: build + args: --features benchmark build-windows: runs-on: windows-latest diff --git a/src/benchmark/bin.rs b/src/benchmark/bin.rs index 6fe5888b7e..e939d20b57 100644 --- a/src/benchmark/bin.rs +++ b/src/benchmark/bin.rs @@ -79,13 +79,12 @@ async fn start_app() { let prepared = (0..futures_limit).map(|_| generator.next().unwrap()); { - let arc_writer = Arc::new(&writer); let mut futures_pool: FuturesUnordered<_> = prepared .into_iter() .map(|(key, data)| { let ltx = tx.clone(); counter += 1; - arc_writer.write(key, data, ltx) + writer.write(key, data, ltx) }) .collect(); println!( @@ -115,7 +114,7 @@ async fn start_app() { if let Some((key, data)) = generator.next() { let ltx = tx.clone(); counter += 1; - futures_pool.push(arc_writer.write(key.into(), data, ltx)); + futures_pool.push(writer.write(key.into(), data, ltx)); } } debug!("#{}/{} next await", counter, futures_pool.len());