We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 00ba7dc commit e879656Copy full SHA for e879656
1 file changed
src/trace.rs
@@ -2,15 +2,15 @@
2
//! Compiles to no-ops unless the `trace` feature is enabled.
3
#![cfg_attr(all(feature = "trace", not(feature = "metrics")), allow(dead_code))]
4
5
-#[inline(always)]
+#[inline]
6
#[cfg(feature = "trace")]
7
pub(crate) fn record_event(name: &str, duration_ns: u64) {
8
// Lightweight hook: use eprintln! to avoid external deps.
9
// Users can redirect stderr if desired.
10
- eprintln!("benchmark::trace name={} ns={}", name, duration_ns);
+ eprintln!("benchmark::trace name={name} ns={duration_ns}");
11
}
12
13
14
#[cfg(not(feature = "trace"))]
15
pub(crate) fn record_event(_name: &str, _duration_ns: u64) {
16
// Compiles to nothing in release builds.
0 commit comments