supervision-js
    Preparing search index...

    Interface DiagnosticsSnapshot

    The clone-safe wire snapshot the worker broadcasts at BROADCAST_HZ. A superset of EngineDiagnostics: renderer, track and scheduler carry the same values, and it adds the realtime needles, the pipeline ledger, derived cache bytes, track geometry, GOP block, scrub aggregates, the play-time seek block, counters, memory, the clock/screen pair, and the worker-evaluated warnings. Only plain data crosses the boundary.

    webgpuAvailable and memory.jsHeapUsedBytes are the fields the worker leaves at their empty value for the main thread to fill after the broadcast, so a rule in evaluateWarnings (which runs in the worker) can never read them, and an exported trace, assembled worker-side, carries the unfilled value. Warnings are evaluated once, worker-side, so the HUD and an exported trace always show the same diagnoses.

    interface DiagnosticsSnapshot {
        presentation: PresentationMode;
        renderer: RendererName | null;
        track: DiagnosticsTrack | null;
        scheduler: SchedulerStats | null;
        realtime: RealtimeDiagnostics;
        pipeline: PipelineDiagnostics;
        cacheBytes: CacheBytesDiagnostics;
        geometry: TrackGeometryDiagnostics;
        gop: GopDiagnostics;
        scrub: ScrubDiagnostics;
        playSeek: PlaySeekDiagnostics;
        counters: CounterDiagnostics;
        memory: MemoryDiagnostics;
        sourceResidency: SourceResidencyDiagnostics | null;
        nativeFps: number | null;
        rate: number;
        presentedRate: number | null;
        playheadMs: number | null;
        screen: ScreenDiagnostics | null;
        status: string;
        webgpuAvailable: boolean;
        warnings: Warning[];
    }
    Index
    presentation: PresentationMode

    Which presentation the engine was loaded for. renderer and the geometry fields that need a bound canvas are null for the whole life of a "frames" engine, which holds none by design; without this a reader cannot tell that from a "canvas" engine whose renderer has not resolved yet.

    renderer: RendererName | null
    track: DiagnosticsTrack | null
    scheduler: SchedulerStats | null
    realtime: RealtimeDiagnostics
    pipeline: PipelineDiagnostics
    cacheBytes: CacheBytesDiagnostics
    geometry: TrackGeometryDiagnostics
    gop: GopDiagnostics
    scrub: ScrubDiagnostics
    playSeek: PlaySeekDiagnostics
    counters: CounterDiagnostics
    memory: MemoryDiagnostics
    sourceResidency: SourceResidencyDiagnostics | null
    nativeFps: number | null
    rate: number

    Media seconds per wall second the transport was told to run at.

    presentedRate: number | null

    The same figure measured off the canvas: media seconds of picture actually presented per wall second, over a trailing window; null unless playback was up across the whole of it. Read against rate it answers the one question a commanded rate cannot, which is whether the picture is really moving that fast. Falling short means frames are arriving slower than the clock wants them, so the picture lags further behind the playhead every second.

    It is a window over whole paints, so it quantises when paints are sparse: a slow rate on a low-fps source reads low from a healthy pipeline. Read it against catchUpMs before concluding anything from a shortfall.

    playheadMs: number | null

    The engine clock at assembly, ms; null before load. Paused, it holds the last commanded target; playing, it advances at rate. The one value the instruments draw the playhead from, so the playhead and the coverage lanes cannot disagree about where "now" is.

    screen: ScreenDiagnostics | null

    What is actually on the canvas: last painted position and its quality; null before the first paint. Its distance from playheadMs is the live landing error (paused) or catch-up depth (playing). A sampled observation for instruments; frame identity for consumers still travels only on the paint event.

    status: string
    webgpuAvailable: boolean
    warnings: Warning[]