Skip to main content

Module perfetto_trace_builder

Module perfetto_trace_builder 

Source
Expand description

Support for generating Perfetto traces.

The public API allows the creation of various TrackDescriptors and TrackEvents required to represent events from the crate::tracker::Track trait, each contained within their own timestamped TracePacket.

To create trace files that can be opened using the Perfetto UI the TracePackets must be wrapped in a Trace message. The build_trace_to_bytes() function is provided to do this and serialise the data ready for writing.

Multiple TracePackets can included within a single Trace message and multiple trace messages can be written consecutively to the same Perfetto trace file.

Structsยง

PerfettoTraceBuilder
State for a trace builder instance.