Skip to content

Commit 1dc1e49

Browse files
committed
Use criterion 0.7
1 parent 3f630f2 commit 1dc1e49

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ futures-lite = { version = "2.0.0", default-features = false, features = ["std"]
3636
async-channel = "2.0.0"
3737
async-io = "2.1.0"
3838
async-lock = "3.0.0"
39-
criterion = { version = "0.6", default-features = false, features = ["cargo_bench_support"] }
39+
criterion = { version = "0.7", default-features = false, features = ["cargo_bench_support"] }
4040
easy-parallel = "3.1.0"
4141
fastrand = "2.0.0"
4242
futures-lite = "2.0.0"

benches/executor.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ fn running_benches(c: &mut Criterion) {
383383
let (resp_send, resp_recv) =
384384
async_channel::bounded(1);
385385
db_send.send(resp_send).await.unwrap();
386-
core::hint::black_box(
386+
black_box(
387387
resp_recv.recv().await.unwrap(),
388388
);
389389
}
@@ -464,7 +464,7 @@ fn running_benches(c: &mut Criterion) {
464464
let (resp_send, resp_recv) =
465465
async_channel::bounded(1);
466466
db_send.send(resp_send).await.unwrap();
467-
core::hint::black_box(
467+
black_box(
468468
resp_recv.recv().await.unwrap(),
469469
);
470470
}

benches/local_executor.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
use std::mem;
2+
use std::hint::black_box;
23

34
use async_executor::{Executor, LocalExecutor, StaticLocalExecutor};
45
use criterion::{criterion_group, criterion_main, Criterion};
@@ -320,7 +321,7 @@ fn running_benches(c: &mut Criterion) {
320321
for _ in 0..web_rng.usize(STEPS / 2..STEPS) {
321322
let (resp_send, resp_recv) = async_channel::bounded(1);
322323
db_send.send(resp_send).await.unwrap();
323-
core::hint::black_box(resp_recv.recv().await.unwrap());
324+
black_box(resp_recv.recv().await.unwrap());
324325
}
325326

326327
// Send the data back...
@@ -393,7 +394,7 @@ fn running_benches(c: &mut Criterion) {
393394
for _ in 0..web_rng.usize(STEPS / 2..STEPS) {
394395
let (resp_send, resp_recv) = async_channel::bounded(1);
395396
db_send.send(resp_send).await.unwrap();
396-
core::hint::black_box(resp_recv.recv().await.unwrap());
397+
black_box(resp_recv.recv().await.unwrap());
397398
}
398399

399400
// Send the data back...

0 commit comments

Comments
 (0)