CI: speed and memory budgets from the perf run #287

Closed
opened 2026-10-22 14:41:28 +00:00 by littlefox · 1 comment
Owner

Approved for 0.7 (D-063).

CI already fails when the web download outgrows its budget (tools/wasm-size.sh). 0.7 rewrites the channel and thread views, so CI should also fail when the gains measured in 0.6 slip back. Those gains are in the 0.6.0 changelog, measured with tools/perf.sh on the big seeded meeting.

Budgets, a little above main-6:

  • all channels listed at login;
  • the p95 step and the slowest step when reading in a chain;
  • wasm memory and DOM nodes at the end;
  • frames over 50 ms while scrolling;
  • server calls at login and in the chain.

How:

  • tools/perf-budget.py checks a results file against e2e/perf/budget.json.
  • The perf spec runs in CI. If that's too slow per push, it runs nightly next to the soak test and on PRs labelled perf.
  • A budget is raised in a commit that says why.

Tests: the check itself, on a results file that passes and on one that fails.

Approved for 0.7 (D-063). CI already fails when the web download outgrows its budget (`tools/wasm-size.sh`). 0.7 rewrites the channel and thread views, so CI should also fail when the gains measured in 0.6 slip back. Those gains are in the 0.6.0 changelog, measured with `tools/perf.sh` on the big seeded meeting. **Budgets**, a little above main-6: - all channels listed at login; - the p95 step and the slowest step when reading in a chain; - wasm memory and DOM nodes at the end; - frames over 50 ms while scrolling; - server calls at login and in the chain. **How:** - `tools/perf-budget.py` checks a results file against `e2e/perf/budget.json`. - The perf spec runs in CI. If that's too slow per push, it runs nightly next to the soak test and on PRs labelled `perf`. - A budget is raised in a commit that says why. Tests: the check itself, on a results file that passes and on one that fails.
littlefox added this to the 0.7: Threads milestone 2026-10-22 14:41:28 +00:00
Author
Owner

Verified, merged in #303; main green (run #561), perf run #560 green.

  • .forgejo/workflows/perf.yml: nightly, by hand, and on pull requests labelled perf. It runs the perf spec (big seeded meeting, 30 ms each way), then tools/perf-budget.py checks the results against e2e/perf/budget.json. Results are uploaded as logs-perf.
  • tools/test_perf_budget.py (run in check): a value over budget fails, a failed scenario fails, a missing metric is reported.
  • The budgets did their job before merging: they caught a slow step on CI (434, then 633 ms) that came from #305. That was fixed in #311; on CI the slowest step is now 271 ms (budget 320), with 972 calls (budget 1170).
  • New for finding such things locally: PERF_CPU=4 tools/perf.sh LABEL slows the browser's CPU like CI's runners.
Verified, merged in #303; main green (run #561), perf run #560 green. - `.forgejo/workflows/perf.yml`: nightly, by hand, and on pull requests labelled `perf`. It runs the perf spec (big seeded meeting, 30 ms each way), then `tools/perf-budget.py` checks the results against `e2e/perf/budget.json`. Results are uploaded as `logs-perf`. - `tools/test_perf_budget.py` (run in `check`): a value over budget fails, a failed scenario fails, a missing metric is reported. - The budgets did their job before merging: they caught a slow step on CI (434, then 633 ms) that came from #305. That was fixed in #311; on CI the slowest step is now 271 ms (budget 320), with 972 calls (budget 1170). - New for finding such things locally: `PERF_CPU=4 tools/perf.sh LABEL` slows the browser's CPU like CI's runners.
littlefox referenced this issue from a commit 2026-10-24 13:23:56 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
littlefox/neokom#287
No description provided.