Skip to content

Count the instructions of each growth row, so growth is measured without a clock - #1221

Draft
dfed wants to merge 4 commits into
mainfrom
claude/growth-instruction-counts
Draft

dfed wants to merge 4 commits into
mainfrom
claude/growth-instruction-counts

Conversation

@dfed

@dfed dfed commented Dec 3, 2026

Copy link
Copy Markdown
Owner

Requested by Dan · project thread

Summary

A growth row of "Check Generate Time on Linux" generates one graph at two sizes and compares the two runs. Its wall time was the only measure that saw work which grows faster than the graph and writes nothing more, and wall time moves by a tenth and more between runs of one tool, so a row near its limit read over it on one run and under it on the next.

The job now also counts the instructions the change's tool executes generating each row at its two sizes, with callgrind (Scripts/generate-time-check.py --growth-instructions). One tool's count on one graph is the same on every run to within a thousandth. A row whose larger graph took its limit times the smaller's (its "instructions" limit, else its "time" limit) is reported with the other performance measures in the pull request's timing comment, and Scripts/perf-watch.py lists it with the rows over a limit and compares it with an earlier run. A row whose instructions could not be counted fails the check. The all-to-all tangle row has an instruction limit of its own, 28.5.

The step installs valgrind in the job's container and preloads a small shim so that libdispatch's wait does not stop valgrind. Counting every row took 15 minutes on a four-core Linux machine, four runs at a time.

Generated output: unchanged

Tests

The script's self-test counts with a stand-in for callgrind: a count that grows with the graph passes, one that grows with its cube is over the default limit and within a row's own, a row's time limit stands in for a missing instruction limit, a counter that writes no total or a tool that refuses fails the row, and a row over its limit is reported and not failed under --report-measures. The performance watch's self-test reads an instruction report after the two comparisons. Two rows were counted with a release tool under valgrind on Linux.

Found and not fixed

  • The step's own time on a CI runner is not measured yet; this change's first run gives it, and the workflow comment is updated with it in this pull request.

Generated by Claude Code

A growth row's wall time was the one measure that saw work which grows
faster than the graph and writes nothing more, and wall time differs
between runs. "Check Generate Time on Linux" now counts the instructions
the change's tool executes generating each row at its two sizes, with
callgrind, and fails a row whose larger graph took its limit times the
smaller's; the row's wall time is reported in the pull request's timing
comment with the others.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
…ts limit

A growth row's wall time was the one measure that saw work which grows
faster than the graph and writes nothing more, and wall time differs
between runs. "Check Generate Time on Linux" now counts the instructions
the change's tool executes generating each row at its two sizes, with
callgrind, and reports a row whose larger graph took its limit times the
smaller's with the other measures in the pull request's timing comment. A
row whose instructions could not be counted fails the check.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
Scripts/perf-watch.py reads every report of a run's timing artifact, so a
growth row over its instruction limit is listed with the other rows over
a limit and compared with the earlier run. The instruction report is
named so that the comparison with the base stays the artifact's first
file.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01HLuVQLHq43QvdYBYGWTdSo
@dfed dfed self-assigned this Dec 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants