summaryrefslogtreecommitdiffstats
path: root/vendor/tracing/benches/enter_span.rs
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/tracing/benches/enter_span.rs')
-rw-r--r--vendor/tracing/benches/enter_span.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/vendor/tracing/benches/enter_span.rs b/vendor/tracing/benches/enter_span.rs
new file mode 100644
index 000000000..757350a53
--- /dev/null
+++ b/vendor/tracing/benches/enter_span.rs
@@ -0,0 +1,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);