Skip to main content

Module tracing

Module tracing 

Source

Structs§

Allocations
The (de)allocations of a thread, as attached to TraceRow::Enter and TraceRow::Exit.
DeltaEncodedTimestamp
A timestamp as serialized in the trace stream: the signed difference in microseconds to the timestamp of the previous row with a timestamp. See “Timestamps” in the docs of TraceRow.
TimestampDecoder
Converts the serialized timestamps of a trace stream back into absolute timestamps. Every row has to be passed to TimestampDecoder::decode in stream order. See “Timestamps” in the docs of TraceRow.
TimestampEncoder
Converts absolute timestamps into the serialized form of the trace stream. See “Timestamps” in the docs of TraceRow.

Enums§

TimestampDecodeError
The trace stream contains an invalid timestamp.
TraceRow
A raw trace line.
TraceValue

Constants§

TRACE_HEADER
The magic bytes at the start of every trace file. They include the version of the trace format, which must be bumped on every incompatible change to TraceRow. The header is followed by a stream of [postcard] serialized TraceRows.
TRACE_HEADER_PREFIX
The part of TRACE_HEADER that is the same for all versions.

Functions§

check_trace_header
Checks that data starts with the TRACE_HEADER of the supported trace format version. data must contain at least TRACE_HEADER.len() bytes, unless the file is shorter.