diff options
Diffstat (limited to 'third_party/rust/tracing/benches/span_no_fields.rs')
-rw-r--r-- | third_party/rust/tracing/benches/span_no_fields.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/rust/tracing/benches/span_no_fields.rs b/third_party/rust/tracing/benches/span_no_fields.rs new file mode 100644 index 0000000000..8a1ff6e041 --- /dev/null +++ b/third_party/rust/tracing/benches/span_no_fields.rs @@ -0,0 +1,13 @@ +use criterion::{criterion_group, criterion_main, Criterion}; +use tracing::{span, Level}; + +mod shared; + +fn bench(c: &mut Criterion) { + shared::for_all_recording(&mut c.benchmark_group("span_no_fields"), |b| { + b.iter(|| span!(Level::TRACE, "span")) + }); +} + +criterion_group!(benches, bench); +criterion_main!(benches); |