macro_rules! trace_scoped {
    ($name: expr) => { ... };
    ($name: expr, $($json:tt)+) => { ... };
}
Expand description

Trace time used from invocation until end of current scope.

The event type is Complete Event (X) with start time and duration.

$name: name of the trace event.

$json: optional custom data formated as serdes json macro.

Examples

{
trace_scoped!("event name");
println!("this is timed");
}
{
trace_scoped!("event name","custom":"data","u32":4);
println!("this is timed");
}