Debian Codegraph @

third_party/rust/tracing/benches/dispatch_get_clone.rs

raw
1 use criterion::{black_box, criterion_group, criterion_main, Criterion};
2
3 mod shared;
4
5 fn bench(c: &mut Criterion) {
6 shared::for_all_dispatches(&mut c.benchmark_group("Dispatch::get_clone"), |b| {
7 b.iter(|| {
8 let current = tracing::dispatcher::get_default(|current| current.clone());
9 black_box(current);
10 })
11 });
12 }
13
14 criterion_group!(benches, bench);
15 criterion_main!(benches);