summaryrefslogtreecommitdiffstats
path: root/vendor/tracing/benches/enter_span.rs
blob: 757350a53976cf0795bfef9887dc123b40fac5aa (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use criterion::{criterion_group, criterion_main, Criterion};
use tracing::{span, Level};

mod shared;

fn bench(c: &mut Criterion) {
    shared::for_all_dispatches(&mut c.benchmark_group("enter_span"), |b| {
        let span = span!(Level::TRACE, "span");
        b.iter(|| {
            let _span = span.enter();
        })
    });
}

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