Skip to content

tools: benchmark and compare output against a base - #139

Merged
rr- merged 3 commits into
mainfrom
rework/1-tools
Nov 5, 2026
Merged

rr- merged 3 commits into
mainfrom
rework/1-tools

Conversation

@rr-

@rr- rr- commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Two checks for the rework that follows, which have to show each step costs no speed and, for a refactoring, changes no output.

  • just bench loads the package at a base commit next to the working tree in one process, and times parse in every style and in auto mode, and compose in every style and rendering, over the case files and the standard library's docstrings. Base and tree run back to back on small chunks, alternating which goes first, and the gate is the median per-round ratio, so load from other processes hits both alike: identical code stays within a few percent even on a busy machine. It fails above 1.10. A CI job runs it on 3.8 and 3.14 against each pull request's base.
  • just parity parses the same inputs plus 20,000 generated docstrings in every style, composes every result in every style and rendering, and lists, then counts per command, the docstrings whose output differs from the base.

@rr- rr- self-assigned this Nov 5, 2026
rr- added 3 commits November 5, 2026 21:29
Add a benchmark that loads the package as it is at a base commit next
to the working tree, in one process, and times parse in every style
and in auto mode, and compose in every style and rendering, over the
case files and the standard library's docstrings.

Base and working tree run back to back on small chunks of the inputs,
alternating which goes first, and the gate is the median of the
per-round ratios. On a loaded machine this keeps identical code within
a few percent, where timing each side in its own process swung by more
than ten. The run fails when any workload is more than 10% slower.

`just bench` runs it against origin/main, and a CI job runs it on
Python 3.8 and 3.14 against the base of every pull request.
Add a check that loads the package as it is at a base commit next to
the working tree, as the benchmark does, and lists the docstrings whose
output differs: the parse result in every style and in auto mode, and
every parse result composed in every style and rendering.

The inputs are the case files, the standard library's docstrings and
20,000 docstrings generated from lines of every style. A refactoring
must leave all of them alone; `just parity` runs it against origin/main.
List how many docstrings differ for each parse and compose command, so
that what a change touches shows before reading examples of it.
@rr-
rr- merged commit 5627f9e into main Nov 5, 2026
26 checks passed
@rr-
rr- deleted the rework/1-tools branch November 6, 2026 13:15
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.

1 participant