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