Contract 0.6: performance metrics (GET/POST /perf) and /status capabilities issue #6 open andymccall opened this · 0 comments
issue #6 open ← closed by proposal #7 Contract 0.6: performance metrics (GET/POST /perf) and /status.capabilities (#6) landed
andymccall set labels enhancement ·
referenced by 2 changes on 10 Oct 2026
andymccall set labels enhancement ·
Ask: a contract level for performance metrics, so a harness can measure how much of each frame a program uses, in the same way it already reads memory and steps frames.
Today nothing in the contract reports CPU time. Metal Gear on the X16 had to put its own scanline probes in the game, at a cost in MAIN memory and with torn reads. Meanwhile the enhanced X16 emulator already computes all of it, but exposes it only over DAP (
x16/perfStats,x16/perfConfig):Proposed 0.6.0 (additive):
GET /perf[?windows=][&zones=][&frames=][&since=]returns JSON:budget,current(the last completed frame),windows[](min, mean, p50, p95, p99, max and overruns),zones[]andframes[](raw per-frame records), all platform-neutral, in guest CPU cycles;platform, for the rest (the X16's VERA bandwidth and sprite render time).POST /perftakes a JSON body of settings: enabled, target FPS, idle mode, history, zones (address ranges, or names for guest marker regions) and reset./statusgainscapabilities, a list of the endpoint groups the backend serves, so a client can check forperfwithout relying on the cumulative ladder.get_perfandset_perfreturn allocated JSON, so the core stays platform-neutral.