From 246f239d9f40f633160f0c18f87a20922d4e77bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:37 +0200 Subject: Merging debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- vendor/tracing/benches/span_fields.rs | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 vendor/tracing/benches/span_fields.rs (limited to 'vendor/tracing/benches/span_fields.rs') diff --git a/vendor/tracing/benches/span_fields.rs b/vendor/tracing/benches/span_fields.rs new file mode 100644 index 000000000..5ad828982 --- /dev/null +++ b/vendor/tracing/benches/span_fields.rs @@ -0,0 +1,23 @@ +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_fields"), |b| { + b.iter(|| { + let span = span!( + Level::TRACE, + "span", + foo = "foo", + bar = "bar", + baz = 3, + quuux = tracing::field::debug(0.99) + ); + criterion::black_box(span) + }) + }); +} + +criterion_group!(benches, bench); +criterion_main!(benches); -- cgit v1.2.3