Commit Graph
3 Commits
Author SHA1 Message Date
simandClaude Opus 5.5 2fd20fbda4 docs/workflows/perf-ab.md: a regression check for every launcher change
The last piece proposed in #564, and a suggestion for the maintainer to accept or decline: every
launcher change starts with a tools/bench.py baseline and shows it doesn't make the launcher slower
or heavier.

- perf-ab.md opens with the regression check: bench.py on the base build before changing anything,
  again on the change, and six result.json fields with limits (key response, return to Home, cold
  start, jank, PSS, idle CPU). A failing field sends the agent to the trace and flame chart method
  below it to find the cost, fix it and measure again.
- The limits sit above the noise of two runs of the same build on a TCL C755 (0 ms key response,
  45 ms cold start, 1 MB PSS). A full run takes about 6 minutes since #949.
- AGENTS.md's switch recipe gains the check as step 9, and its PR checklist a Performance row.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 09:28:35 +10:00
simandClaude Opus 5.5 7de6947bef tools: screendiff.py, before/after screenshots compared pixel by pixel, private details blurred
The third of the performance tools proposed in #564. Every performance PR claims Home looks the same;
this checks it, and makes the screenshots safe to post:

- Compares the two screenshots, leaving out the regions given with --mask (the clock moves on), and
  reports how many pixels differ by more than --threshold (default 8, compression noise) and where.
  Exit status 0 identical, 1 different, 2 an error, so a script can rely on it.
- Writes the pair side by side with --blur regions pixelated in both (the Wi-Fi name), and with
  --diff the differing pixels themselves.
- Boxes are checked before anything is read; one outside the picture, or screenshots of different
  sizes, are errors rather than a silent partial compare.
- tools/screendiff.md says how to find the boxes on your own layout with uiautomator, and what makes
  the comparison mean something.

Pillow was already added to tools/requirements-perf.txt for flamechart.py; nothing new to install.
The image tests skip without Pillow, so CI stays as it is.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-23 09:28:35 +10:00
simandClaude Opus 5.5 6e2ec10231 docs/workflows/perf-ab.md: measure a launcher change with traces and a flame chart
The first workflow doc in the shape agreed in #563: a one-line "When to use this", a checklist, and
links to the tool guides rather than a copy of them. It writes down the method #666 used: choose the
scenario and the slices before measuring, trace both builds 5 times, report, draw the flame charts
with that highlight, check behaviour, and what goes in the PR.

AGENTS.md's repo map lists docs/workflows/, and tools/trace.md and tools/flamechart.md link to it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-22 22:56:39 +10:00