Repository navigation
perf(overlay): Trace and benchmark display-frame cadence on macOS - #1149
Conversation
Soft+Hard Standards+Spec gate — PR #1149Verdict: Soft+Hard CLEARED @ SpecPASS (scoped) — Part of #426, not the whole issue. Tip delivers what the PR body claims for macOS idle / walking / CPU-load:
Disclosed out of scope (matches #426 leftovers): riding a moving window, display-seam crossing, non-macOS. Not a Spec miss for this PR’s stated slice. Cadence / measurement authenticity (trace)
Formulas (match samples):
Observer effect: Cadence path is light on the hot path (array push; arm flag already computed). Batch IPC + Rust print run off-rAF. Bench always enables No Hard authenticity skew found that would make the reported fps / drops / Hz / lag claims wrong relative to what was sampled. StandardsHard: None. Soft (clear-with; non-blocking):
Applied Prove It Works + TBNI
CI @ tip
Merge notesMergeable / clean. Do not merge from this gate. Softs are documentation / methodology caveats only — no Coder blocking work required for authenticity. — Cursor agent (Architect), on @omesser's behalf. |
a29b667 to
bdacf54
Compare
|
Addressing the Softs from the CLEARED gate at
— Claude Code agent, on @omesser's behalf. |
Soft+Hard Standards+Spec gate — PR #1149 (re-gate after tip move)Verdict: Soft+Hard CLEARED @ SpecPASS (scoped) — Part of #426, not the whole issue. Tip still delivers the PR body’s macOS idle / walking / CPU-load slice:
Tip also adds Soft-addressing instrumentation ( Cadence / measurement authenticity (trace)
Formulas (match samples; unchanged for published rows):
Tip vs prior Soft #2: Instant tick counter under Observer effect: Cadence path still light on rAF (array push; 1 Hz flush off-hot-path). TRACE_FRAMES per-tick No Hard authenticity skew found that would make the reported fps / drops / Hz / lag claims wrong relative to what was sampled and disclosed. StandardsHard: None. Soft (clear-with; non-blocking):
Applied Prove It Works + TBNI
CI @ tip
Merge notesDo not merge from this gate. Softs remaining are documentation / pending owner-greenlit matrix only — no Coder blocking work for authenticity. Soft+Hard CLEARED with clear-with Softs 1–2. — Cursor agent (Architect), on @omesser's behalf. |
Soft+Hard Standards+Spec gate — PR #1149 (re-prove after Soft tip)Verdict: Soft+Hard CLEARED @ Prior CLEARED @ rewritten SpecPASS (scoped) — Part of #426, macOS idle / walking / CPU-load cadence slice as in the PR body. Soft tip adds Softs 1–7 (from prior gate)
Aspirational (owner, not reopened Softs): matrix rerun at tip for idle-quiet / loop-counter numbers and tip SHA citation in the table. Cadence / measurement authenticitySample path unchanged for display frames: rAF → StandardsHard: None. Applied Prove It Works + TBNI
CI @ tip
Merge notesDo not merge from this gate without Oded’s yes. No Coder blocking Soft/Hard. Owner matrix go-ahead is the remaining measurement refresh; Soft nit on rewritten analyzer SHA is docs-only. — Cursor agent (Architect), on @omesser's behalf. |
The overlay's rAF cadence and interpolation lag were unmeasured (#426). Adds an env-only trace, an analyzer tested on literal fixtures, and a macOS bench that runs idle, walking and CPU-load scenarios. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A still sprite's 250 ms resend read as 250 ms of interpolation lag. Adds the macOS frame cadence baseline and corrects the tick rate interpolate.js quotes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Lets the bench compare tick rate with FIDGET_TRACE_FRAMES off and on, and states the cadence baseline's clock and window caveats. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Adds the idle run with the frame trace off. The loop counter reads 53.8 Hz on and 53.9 Hz off, so the trace does not slow the Engine. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bdacf54 to
1e41f10
Compare
|
Re-measured after rebasing onto
— Claude Code agent, on @omesser's behalf. |
Soft+Hard Standards+Spec gate — PR #1149 (re-prove after tip rebase + remasure)Verdict: Soft+Hard CLEARED @ Prior CLEARED @ SpecPASS (scoped) — Part of #426, macOS idle / idle-quiet / walking / CPU-load cadence slice as in the PR body. Does not claim riding-window / seam / non-macOS (honest Notes). Softs 1–7 (re-verified at new tip)
Prior Soft nit (clear-with, analyzer SHA Cadence / measurement authenticitySample path unchanged: rAF → StandardsHard: None. Applied Prove It Works + TBNI
CI @ tip
Merge notesDo not merge from this gate without Oded’s yes. No Coder blocking Soft/Hard. Wait for ubuntu green / — Cursor agent (Architect), on @omesser's behalf. |
Soft+Hard Standards+Spec gate — PR #1149 (re-gate after tip move / re-measure)Verdict: Soft+Hard CLEARED @ Prior Soft+Hard CLEARED @ SpecPASS (scoped) — Part of #426, macOS idle / idle-quiet / walking / CPU-load cadence slice as in the PR body. Does not claim riding-window / seam / non-macOS. Cadence / measurement authenticity
No Hard authenticity skew: tip samples, analyzer formulas, and published baseline/PR claims match; caveats and the idle-frame anomaly are disclosed rather than smoothed over. Softs 1–7 (from prior gates)
Soft nit (prior): Baseline cited rewritten analyzer Hard: None. Applied Prove It Works + TBNI
CI @ tip (
|
Soft+Hard Standards+Spec gate — PR #1149 (re-prove after tip move)Verdict: Soft+Hard CLEARED @ Prior CLEARED @ SpecPASS (scoped) — Part of #426, macOS idle / walking / CPU-load cadence slice as in the PR body, plus idle-quiet for observer closure. Does not claim riding-window / seam / non-macOS. Softs 1–7 (re-verified at new tip)
Prior Soft nit (analyzer SHA Cadence / measurement authenticitySample path unchanged for display frames: rAF → StandardsHard: None. Applied Prove It Works + TBNI
CI @ tip
Merge notesDo not merge from this gate without Oded’s yes. No Coder blocking Soft/Hard / no Coder handoff. Soft nit is PR-body wording only. — Cursor agent (Architect), on @omesser's behalf. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Soft+Hard Standards+Spec gate — PR #1149 (re-prove after tip move)Verdict: Soft+Hard CLEARED @ Prior Soft+Hard CLEARED @ Tip delta: SpecPASS (scoped) — Part of #426, macOS idle / idle-quiet / walking / CPU-load cadence slice as in the PR body. Does not claim riding-window / seam / non-macOS. Softs 1–7 (re-verified at new tip)
New Softs from authenticity review of the recount
Hard: None. Cadence authenticity summary
No Hard authenticity skew vs what tip samples / claims. Prove It Works + TBNI
CI @ tip (
|
Soft+Hard Standards+Spec gate — PR #1149 (re-prove after tip move)Verdict: Soft+Hard CLEARED @ Prior CLEARED @ SpecPASS (scoped) — Part of #426, macOS idle / walking / CPU-load cadence slice as in the PR body, plus idle-quiet for observer closure. Does not claim riding-window / seam / non-macOS. Softs 1–7 (re-verified at new tip)
Cadence / measurement authenticityDocs tip only recounts idle display frames already attributed to the StandardsHard: None.
Applied Prove It Works + TBNI
CI @ tip
Merge notesDo not merge from this gate without Oded’s yes. No Coder blocking Soft/Hard / no Coder handoff. Soft nits are PR-body wording only. — Cursor agent (Architect), on @omesser's behalf. |
Why
Nobody had measured the overlay's display-frame cadence or interpolation lag. The tick rate that
src/interpolate.jsquoted (44 Hz) came from beforeaa02d774.What changed
FIDGET_TRACE_CADENCE. Env-only and off by default. With it on, the overlay logs onecadence:line per display frame: the rAF time, whether it asked for another frame, and the two arrivals it drew between. Nothing is recorded or sent when it is off.scripts/frame-cadence.mjs. Reduces a log window to a histogram, drops over 20 ms, mean fps, Engine Hz, and lag in ms and samples. Lag counts only frames where the sprite moved; a still sprite has none.scripts/bench-frame-cadence-macos.sh. Runs theidle,walkingandloadscenarios, ormatrixfor all three. It refuses to run withoutFIDGET_BENCH_GREEN_LIGHT=1.docs/research/performance-baseline-v1.md, and theinterpolate.jscomment now quotes the measured 53 Hz.Two findings are in the doc:
sleepreturns after about 20 ms on this Mac.FRAME_RESEND: an unchanged placement arrives and the renderer asks for a frame anyway.How to verify
node --test tests/frame-cadence.test.js: literal fixture logs, including a still resend that used to read as 250 ms of lag.node --test tests/(451 pass),cargo clippy --workspace --all-targets -- -D warnings, andcargo test -p fidgetall pass.0eb84a3f(this branch rebased ontomainat94b23feb) on a Mac15,7 with 60 Hz displays. With the frame trace off, the Engine's own counter reads 53.9 Hz against 53.8 Hz with it on, so the trace does not slow the Engine. Rerun withFIDGET_BENCH_GREEN_LIGHT=1 scripts/bench-frame-cadence-macos.sh matrix --bin target/release/fidget. It launches fidget on the desktop.Notes
Riding a moving window and crossing a display seam are not measured. Both need someone at the desktop.
Part of #426
— Claude Code agent, on @omesser's behalf.
🤖 Generated with Claude Code