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 b07b25b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 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/cargo@v1
with:
command: build
args: --features benchmark

build-windows:
runs-on: windows-latest
Expand Down
6 changes: 2 additions & 4 deletions src/benchmark/bin.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ mod prelude {
io::Write,
ops::Add,
path::{Path, PathBuf},
sync::Arc,
time::{Duration, Instant},
};
}
Expand Down Expand Up @@ -79,13 +78,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 +113,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 b07b25b

Please sign in to comment.