Expand description
A low-overhead way to capture timings of lots of spans within your application, then at a later point, gather the traces from each thread and write them as a Perfetto trace file for viewing in the Perfetto UI.
Macros§
- scope
- Begins a time span that ends when the current scope ends.
- start_
span - Begins a timing span, returning a guard, that when dropped will end the span.
Structs§
- Counter
Track - A handle to a counter track that can be used to record counter values.
- Span
Guard - A guard that when dropped will end a span.
- Thread
Trace Data - Trace events that occurred on a single thread.
- Trace
Builder - Used to build a trace file.
- Tracing
Disabled - An error that is produced if [enable] has not been called, but we’re trying to build a trace.
- Tracing
Disabled AtBuild Time - An error that is produced if [enable] is called when the “enable” feature of this crate is not active.
Enums§
- Counter
Unit - Units for counter tracks.
Constants§
- EVENTS_
PER_ ARG - The number of events consumed by each argument.
- EVENTS_
PER_ COUNTER - The number of events consumed by each counter value.
- EVENTS_
PER_ SPAN - The number of events consumed by each span.
Traits§
- Record
Arg - Types that implement this trait can be used as arguments to the [span] macro.
Functions§
- current_
thread_ reserve - Reserve capacity on the current thread for additional spans and their arguments.
- is_
enabled - Returns whether recording is enabled.
- start
- Enable recording. Can be called multiple times. Any spans emitted prior to the first call will be discarded.