Skip to main content

Crate perfetto_recorder

Crate perfetto_recorder 

Source
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§

CounterTrack
A handle to a counter track that can be used to record counter values.
SpanGuard
A guard that when dropped will end a span.
ThreadTraceData
Trace events that occurred on a single thread.
TraceBuilder
Used to build a trace file.
TracingDisabled
An error that is produced if [enable] has not been called, but we’re trying to build a trace.
TracingDisabledAtBuildTime
An error that is produced if [enable] is called when the “enable” feature of this crate is not active.

Enums§

CounterUnit
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§

RecordArg
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.