1use criterion::{criterion_group, criterion_main, Criterion};
2use tracing::{span, Level};
3
4mod shared;
5
6fn bench(c: &mut Criterion) {
7 shared::for_all_recording(&mut c.benchmark_group("span_fields"), |b| {
8 b.iter(|| {
9 let span = span!(
10 Level::TRACE,
11 "span",
12 foo = "foo",
13 bar = "bar",
14 baz = 3,
15 quuux = tracing::field::debug(0.99)
16 );
17 criterion::black_box(span)
18 })
19 });
20}
21
22criterion_group!(benches, bench);
23criterion_main!(benches);
24