summaryrefslogtreecommitdiffstats
path: root/vendor/tracing/benches/dispatch_get_ref.rs
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(&current);
            })
        })
    });
}

criterion_group!(benches, bench);
criterion_main!(benches);