macro_rules! val {
($key:expr) => { ... };
}Expand description
Value tracking macro that logs key-value pairs to the profiler.
Unlike dbg!, this macro takes a string key and returns a handle
with a .set() method. Values are grouped by key (not source location),
but each log entry records its source location for debugging.
§Examples
ⓘ
use hotpath::val;
// Track a counter value
hotpath::val!("counter").set(&count);
// Track state changes
hotpath::val!("state").set(¤t_state);
// Dynamic keys work too
let key = format!("counter_{}", id);
hotpath::val!(key).set(&value);