blob: a59c343795cecf25b099aca19e7ae7facdcca02f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
use criterion::{black_box, criterion_group, criterion_main, Criterion};
mod shared;
fn bench(c: &mut Criterion) {
shared::for_all_dispatches(&mut c.benchmark_group("Dispatch::get_ref"), |b| {
b.iter(|| {
tracing::dispatcher::get_default(|current| {
black_box(¤t);
})
})
});
}
criterion_group!(benches, bench);
criterion_main!(benches);
|