Skip to main content

track_duration

Macro track_duration 

Source
macro_rules! track_duration {
    ($category:expr, $track:expr, $name:expr $(, $key:expr => $val:expr)* $(,)?) => { ... };
}
Expand description

Scoped duration for a custom track.

NOTE: This macro creates variables for args and _scope in the enclosing scope and relies on Rust’s lifetime rules to drop the duration guard to calculate the duration. If you need to invoke track_duration! multiple times in the same function, you must wrap each invocation in its own nested lexical block { ... } to have separate duration events emitted.