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ยง

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