KiteTrace
The trace seam: a timeline of what the player did, for a profiler to draw.
Process wide, like KiteLog, and silent until an application installs a Sink. With no sink, every place in the engine that could trace costs one volatile read and does nothing else. ChromeTraceFormat turns what a sink receives into lines that Chrome's trace viewer and Perfetto open.
What the engine traces:
Spans:
session/open, the phases of a seek (seek/keyframe,seek/refine,seek/precise), andtrack/switch.Spans per frame, only when installed with
perFrame:video/decodeandvideo/present, each with the frame's timestamp in microseconds aspts.Instants:
audio/underrun, when the engine sees the underrun count rise, andvideo/drop, when the schedule drops a late frame.
Times are nanoseconds on the engine's monotonic clock. Values are strings, and a URI arrives only as its basename, so a trace cannot leak a token from a query string.