Skip to content

Commit

Permalink
post review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
archeoss committed Dec 16, 2023
1 parent e8a2b5a commit dd2a33f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 2 additions & 3 deletions src/benchmark/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit dd2a33f

Please sign in to comment.