Epic: #113 · Milestone: MC0 — Product & decisions
Why
"Performant and resource cheap" is only true if it is measured every commit. The repo's culture is ratchets that never fall; budgets get the same treatment.
Budgets (from #43)
| Gate name | Metric | v1 target | Stretch |
|---|---|---|---|
boot-to-home-screen | power-on → first interactive frame (serial timestamp + capture) | ≤ 8 s | ≤ 4 s |
idle-budget | whole-system RSS / CPU after 60 s idle on home screen | ≤ 128 MB / ≤ 3 % | 96 MB / 1 % |
tv-ui-60fps | p99 frame time while scrolling a 500-item grid | ≤ 16.6 ms | — |
input-latency | CEC/BT key → first changed frame (capture timestamps) | ≤ 50 ms | 33 ms |
decode-load-1080p-h264 | CPU while playing the reference 1080p60 H.264 clip | ≤ 60 % of 4 cores | 40 % |
power-idle / power-play | smart-plug watt reading | ≤ 3 W / ≤ 6 W | — |
soak-4h | 4 h continuous playlist: zero crashes, RSS growth < 5 % | pass | — |
Tasks
- Kernel-side instrumentation in Home: monotonic boot timestamps printed on serial at each milestone, a
perfshell command printing RSS/CPU per process, and a frame-time histogram exported by the compositor. scripts/pi/measure-*.shfor each gate, producing JSON;scripts/perf-ratchet.shcompares againstscripts/perf-floors.jsonand fails if any metric regresses beyond tolerance.- QEMU-runnable variants for the metrics that are meaningful there (idle RSS, frame time under
-machine virtwith a virtual framebuffer) so PRs get a signal before the weekly HIL run. - Add the gates to the HIL workflow in #111.
Acceptance
All gate scripts exist and run against the current image (failing is fine at first); floors file checked in; the HIL job reports every metric.