performance owns monitoring interfaces, engine frame/output data, scopes, collectors, snapshot publication, presentation and Tracy adapters. The shared clock, CPU accounting, sample types and profiler helpers belong to ncl_perf. Qualify types at subsystem boundaries and preserve the PerformanceMonitor001 factory string and public field layouts.
All monitor methods run on the main engine/frame owner thread, including const reads and worker-result publication. Workers return owned results; their owner translates and reports them. CPU scopes close in reverse nesting order on that thread. GPU scopes additionally require its matching live context. Context release or abandonment precedes CPU/subscription shutdown.
FrameSubscription owns its numeric NitroApi subscription. Shutdown during an active outer Host frame defers detachment until it handles OnHostExit for completion or abort. Keep the observer and trace backend available until that boundary so an incomplete Host cannot become a completed measurement. The authoritative subscription and invocation contract is in NitroApi.
The stable performance core constructs clock, final concrete monitor, and mapper in dependency order and survives runtime shutdown. PerformanceRuntime receives immediate core, cached native table, device, and lifecycle dependencies. It owns stable cvars, network/presentation state, GPU/trace adapters, and hook/subscription storage. Native Bind resolves factories and tables once; ordinary hooks capture the runtime. C callbacks select one bound sink. Bind the console-text input after the engine table is copied in OnGameInitializing, then bind validated cvars and localization at OnGameInitialized. Update an existing panel through that same explicit binding. Panel draws use supplied text, clock, localization, console-text, and texture-bookkeeping dependencies. Stop stage/swap work and release or abandon GPU inputs before CPU/subscription shutdown; runtime and trace storage remain alive through the final Host exit.
Reset the mapper session before stock CL_ClearState and at map changes. Its private epoch rejects stale outer views without clearing fresh nested snapshots. Preserve synchronous map/connection/world identity checks after the native chain. Native context checks belong at matrix-capture and outline boundaries, not inside model or sampler loops.
The maintained monitor architecture describes measurement types and participating modules. Renderer context and terminal ordering follow the renderer owner rules. Verify the affected normal and profiler consumers; a static test engine does not verify shipping factory registration.