Crate rs_tracing

source ·
Expand description

rs_tracing is a crate that outputs trace events to a file in the trace event format.

This format is used by chrome://tracing the output can also be converted to html with trace2html.

If the feature rs_tracing is not set in the toml file the macros expand to nothing, with the exception of trace_expr that will still execute the expression, also all crate dependencies of rs_tracing will be removed.

Macros

closes trace file
Activates trace and opens a new trace file with the name <pid>.trace in the dir specified.
Activate tracing
Mark beginning of event, needs to be followed by corresponding trace_end.
Deactivate tracing
Mark end of event, needs to be proceeded by corresponding trace_begin.
trace time used for expression to finish.
Trace time used from invocation until end of current scope.