Repository navigation
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
Timing of e839d23Wall 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.
|
…ing-comment-only
… and read peak memory on two figures (#1212) ## Summary Two changes to how CI treats performance, landed together because the second is built on the first. This also lands #1211, which closes as landed here. **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, `.safedi` size, 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.py` is how a row over its limit is seen and owned instead of met as a red build. Given a report file, or `--commit SHA` to 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: - With glibc's default arenas, one tool's peak on one graph sits at one of several levels. A chain of 1,500 declarations peaked at about 76 MB or about 100 MB with the same tool, which read as 1.34 times its base against a limit of 1.3 on a change that used no more memory. The figure with one arena beside it says whether the tool allocated more. - One arena reuses what a tool freed, so it hides a tool that holds more. A tool built to generate twice and hold the first result read 1.02 times its base with one arena on that chain and 1.01 on an app of 300 modules, and 1.23 and 1.32 in the timed runs. Of six shapes, only one was over its limit with one arena. 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-test` reads 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 - A growth row's wall time has the noise of any wall time, so its ratio in the comment moves between runs. Planned as a follow-up pull request that adds instruction counts, which are the same on every run, to the growth rows. - `perf-watch.py` reads 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. - A tool that holds a second parse of a module is under every memory limit on both figures (1.02 to 1.11 times on six shapes), so this check does not see that class of regression. Left: seeing it needs a tighter limit, which the timed runs cannot carry and which one arena carries only for the largest shapes. - One arena is not level between hours either: one tool's median on the chain read 75.3 MB and later 71.8 MB. Left: both tools run in the same step, so the ratio is unaffected. - Every shape now takes five more runs of each tool, which lengthens the step by a time its next run measures. Left: the step has no time limit.
|
Landed as part of #1212. |
Summary
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.
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. This pull request's own run is the first to post the comment.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