how this was recorded

the bench never trusts what wrec says about itself. every number on the benchmarks page is decoded out of the pixels of the finished recording — the same file a user would keep.

1 · a window that counts out loud

a stimulus window redraws at the display refresh rate. each redraw paints its own frame number as a strip of big black/white blocks — 1 bit per block, with guard patterns at both ends:

the number advances once per rendered frame, so every index that reaches the screen is consecutive. the window also holds a power assertion — a dimming display would otherwise read as a frame-rate collapse. all but one point of the window sits beyond the display edge, and it never activates or accepts input, so the bench does not flash over or steal focus from the user's work.

2 · wrec records it, black box

the harness drives the real release binary through the public CLI only: wrec record start --target window:<id> --json, one fresh isolated daemon per recording (own WREC_HOME, own socket, env overrides scrubbed). no bench mode, no test hooks — wrec cannot tell it is being measured.

3 · the file is the referee

after each run an AVAssetReader walks every frame of the .mov and reads the block numbers back. missing number = a displayed frame the recorder lost. from this fall out observed fps, capture completeness, duplicate frames, PTS gaps and ordering. the engine's own frames/dropped counters are recorded too — and if they disagree with the decoded truth by more than 5%, that is itself a failing gate.

4 · cost and latency on the side

while recording, ps samples cpu and rss of the daemon tree every 250 ms; start latency (command → first frame written) and finalize latency (duration elapsed → closed file) come from the timestamped --json job events.

5 · a/b, not vibes

for a release, candidate and reference binaries run three paired reps per profile in alternating A/B and B/A order, in the same session — and gates compare paired medians. a regression fails only if the candidate is >15% worse and beyond an absolute noise floor. thermal drift and background load hit both binaries equally, so they cancel.

6 · three verdicts, not two

on battery, under thermal pressure, under load, or when same-binary reps disagree beyond the noise floor, perf gates return inconclusive instead of pass/fail. correctness gates (codec, dimensions, PTS order, frame accounting) always stay hard — machine load cannot corrupt those.

profiles: efficient-720p30-hevc · balanced-1080p30-hevc · high-native60-hevc · balanced-1080p30-h264. every release ships its bench as wrec-bench-<version>.json; run it yourself with bun run bench release --against <previous wrec>.