perf(timing): say which render-thread work a late frame followed (#694)

* perf(timing): say which render-thread work a late frame followed

The soak already says how often a moving frame reached the panel late, but
not what the render thread was doing just before it. Vegas does two kinds of
work there between frames -- building its strip (compose, extend) and, with
live elements, patching changed pixels into it -- and deciding whether either
is affordable needs their own numbers.

- FrameTimingRecorder.note_op(kind, nbytes) tags the next presented frame.
  Totals gain op_frames, late_op_frames, op_freezes and op_bytes per kind;
  aggregate() still takes frames without ops. The file schema is unchanged.
- Vegas tags compose and every strip extension (with the bytes it copied).
- frame_soak prints an "after work" table: frames, late %, freezes and MB
  moved per kind, only when something tagged its work.
- render_bench gains --strip-screens (Vegas-sized strips), --patch-bytes /
  --patch-every / --patch-where (in-place column writes, as a live element
  update does) and --extend-every-screens / --extend-width (append + trim on
  a fixed cadence that holds the strip's width).

No runtime behaviour changes: this is the measurement gate for live Vegas
elements.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs(changelog): note the frame-op attribution and bench modes

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Chuck
2026-09-30 20:40:39 -04:00
committed by GitHub
co-authored by Claude Opus 5.5
parent 7804ea8f69
commit 77862b631b
7 changed files with 707 additions and 19 deletions
+12
View File
@@ -334,6 +334,18 @@ read any of them:
### Tooling
- The frame-timing recorder says which render-thread work a late frame
followed. Work done between two frames calls
`FrameTimingRecorder.note_op(kind, nbytes)` and the next presented frame
carries the tag; the stats gain `op_frames`, `late_op_frames`, `op_freezes`
and `op_bytes` per kind (additive; the file's schema version is unchanged).
Vegas tags every strip `compose` and `extend`, and `frame_soak.py` prints an
"after work" table with each kind's own late rate.
`scripts/render_bench.py` can drive the same work on a panel with nothing
else running: `--strip-screens` for a Vegas-sized strip, `--patch-bytes /
--patch-every / --patch-where` for in-place column writes, and
`--extend-every-screens` for appending and trimming on a fixed cadence.
See "Soaking a rig" in `docs/SCROLL_PERFORMANCE.md`.
- `scripts/sports_drift_report.py`: for a ledmatrix-plugins checkout, counts
how many different bodies each method family has across the nine
scoreboards' `sports.py`, `manager.py` and `game_renderer.py`, lists the