Skip to content

Commit 84f3727

Browse files
committed
inline boost
1 parent 23ce8e3 commit 84f3727

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

opentelemetry/benches/context_suppression.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ use opentelemetry::Context;
88
// criterion = "0.5.1"
99
// Hardware: Apple M4 Pro
1010
// Total Number of Cores:   14 (10 performance and 4 efficiency)
11-
// | Benchmark | Time (ns) |
11+
// | Benchmark | Time |
1212
// |----------------------------|-----------|
13-
// | enter_suppressed | 9.0 |
14-
// | normal_attach | 9.0 |
15-
// | is_current_suppressed_false| 1.2 |
16-
// | is_current_suppressed_true | 1.2 |
13+
// | enter_suppressed | 9.0 ns |
14+
// | normal_attach | 9.0 ns |
15+
// | is_current_suppressed_false| 750 ps |
16+
// | is_current_suppressed_true | 750 ps |
1717

1818
fn criterion_benchmark(c: &mut Criterion) {
1919
let mut group = c.benchmark_group("telemetry_suppression");

opentelemetry/src/context.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -461,6 +461,7 @@ impl Context {
461461
/// let _guard = Context::enter_suppressed();
462462
/// assert_eq!(Context::is_current_suppressed(), true);
463463
/// ```
464+
#[inline]
464465
pub fn is_current_suppressed() -> bool {
465466
Self::map_current(|cx| cx.is_telemetry_suppressed())
466467
}

0 commit comments

Comments
 (0)