Macro rs_tracing::trace_begin
source · macro_rules! trace_begin {
($name: expr) => { ... };
($name: expr, $($json:tt)+) => { ... };
}
Expand description
Mark beginning of event, needs to be followed by corresponding trace_end.
The event type is Duration Event (B) with an instant time. Start and end of the event must be on the same thread. If you provide custom data to both the trace_begin and trace_end then the arguments will be merged.
$name: name of the trace event.
$json: optional custom data formated as serdes json macro.
Examples
trace_begin!("event name");
println!("this is timed");
trace_end!("event name");
trace_begin!("event name","custom":"data");
println!("this is timed");
trace_end!("event name","u32":4);