Repository navigation
Report performance measures over a limit in one pull request comment, and read peak memory on two figures - #1212
Conversation
"Check Generate Time on Linux" and "Check Function Compile Time on Linux" failed on wall times, which differ between runners and between runs of one runner, so a failure was answered by running the job again. Both now report a wall time over its limit as a warning, and "Post Timing to the Pull Request" writes their reports into one comment that every run rewrites, with the change's tool against the newest release's beside the comparison with main. Peak memory, `.safedi` size, generated code, a shape the tool cannot generate and a log with no time in it fail as before. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
…erf-watch.py Peak memory, `.safedi` size and the growth rows failed "Check Generate Time on Linux" as wall time did, and a change that moved one was answered by a commit that moved a limit and a run of every check again. Under `--report-measures`, which CI now passes, each is reported in the pull request's timing comment and fails nothing; a shape or a row the tool cannot generate still fails. No limit changes. `Scripts/perf-watch.py` reads a run's report, from a file or from a commit's newest CI run, and lists every row over its limit with its ratio and limit, how it moved since an earlier run, and every other row that got worse. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
"Check Generate Time on Linux" compared the peak of the timed runs for most shapes. With glibc's arenas one tool's peak on one graph sits at one of several levels, so a chain of 1,500 declarations read 1.34 times its base with a tool that used no more memory. Every shape now takes the runs with one arena that the large shapes and the shapes with a limit of their own already took, and is compared on those alone, at the same limits. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
…ing-comment-only
…ena and in the timed runs Comparing every shape on its runs with one arena alone would have hidden a tool that holds more: one arena reuses what a tool freed, so a tool made to generate twice and hold the first result read 1.02 times its base there on a chain of 1,500 declarations and 1.23 in the timed runs. The shapes that were compared on their timed runs keep that comparison and take the runs with one arena as well, at the same limit, so a row over its limit on one figure is read beside the other. The shapes already compared with one arena alone are unchanged. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
…SafeDI into claude/memory-rows-one-arena
Timing of 3221d2dWall times measured in this run. A wall time, peak memory, size or growth row over its limit is reported here and fails no check; a shape the tool cannot generate still fails "Check Generate Time on Linux". Every run rewrites this comment, and a check that did not run in it is not listed.
Every shape and row
Growth, the head tool alone: each row at its layers and at 2 more, or at the two numbers it names; median of 3 alternating runs for time, and of 3 more with one allocator arena for peak memory. A measure fails at 2 times the smaller graph's, or at the limit beside it.
The compiler's time on single functions: 0 finding(s), reported and not failed. The compiler's time on single functions of SafeDICore, release build.
|
Summary
Two changes to how CI treats performance, landed together because the second is built on the first.
A performance row over its limit no longer fails CI. "Check Generate Time on Linux" and "Check Function Compile Time on Linux" report it as a warning, and a new job, "Post Timing to the Pull Request", writes their reports into one comment on the pull request that every run rewrites, with the change's tool against the newest release's beside the comparison with main.
This covers every measure of the check: wall time, peak memory,
.safedisize, and a growth row's time, memory, size and generated code. A wall time differs between runners and between runs, so a failure on it was answered by running the job again. A change that moved another measure was answered by a commit that moved a limit and a run of every check again. Neither found a defect that a reader of the figures would not.No limit changes: the limits are what the report calls "over". What still fails is a shape or a growth row the tool cannot generate or does not finish, and every check of correctness.
Scripts/perf-watch.pyis how a row over its limit is seen and owned instead of met as a red build. Given a report file, or--commit SHAto fetch the report of that commit's newest CI run, it lists every row over its limit with its ratio and limit, how the row moved since an earlier run (--before,--before-commit), and every other row whose ratio got worse.A pull request from a fork gets no comment, since its token cannot write; the reports stay in the two jobs' summaries. A comment that cannot be posted is a warning.
Every shape's peak memory is read on two figures. The timed runs, as before, and runs with one allocator arena (
MALLOC_ARENA_MAX=1), which only the four largest shapes and the shapes with a limit of their own took. A shape is over its limit on either, at the same limit. The shapes already compared with one arena alone are unchanged. Neither figure does the other's work:Generated output: unchanged
Tests
The scripts' self-tests cover the new modes (
--report-time,--report-measures,--report-only): every finding over a limit is a measure, and a shape the tool refuses is not and still fails.perf-watch.py --self-testreads a sample report with rows over a limit in each table, against an earlier one, and refuses a report with no rows; CI runs it beside the other self-test. The self-test of the generate time check gains four cases for a shape held on both memory figures: twice the memory in the timed runs alone is one finding, half more with one arena alone is one, half more on both is two, and a fifth more is none.Found and not fixed
perf-watch.pyreads the report's Markdown tables rather than a file made for it. Left: both scripts are in one repository and the self-test reads the same table layout, so a change to one that breaks the other fails CI.https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
Generated by Claude Code