Repository navigation
Conversation
pnpm 12.8.0 doubled the statx calls of a hot-store install (pnpm#17500) while the timing check stayed within tolerance: on a warm page cache a stat costs about a microsecond, so 67k extra calls move a 1 s install by less than the 5% noise allowance. When HEAD and main are compared, the harness now runs every install twice more, untimed, under `strace --follow-forks --summary-only`, and the run script stores the per-syscall counts in the report. The comparison adds a "Same-run syscall check" table: a file syscall regresses when HEAD's fewest calls exceed main's most by more than 2% of main or 50 calls, whichever is larger. A syscall whose two identical runs differ by more than that is reported unstable and not gated. The workflow also takes `head_ref`/`main_ref` dispatch inputs, so a past regression can be benchmarked with the current harness, and an `INTEGRATED_BENCHMARK_RUNNER` repository variable, so forks without Blacksmith runners can run it. Assisted-by: Claude:claude-opus-5-5
Owner
Author
|
Superseded by #3, which carries this commit together with the round-2 review fixes. Assisted-by: Claude:claude-opus-5-5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a syscall-count row to the integrated benchmark's same-run comparison, so a change that multiplies filesystem work fails the check even when wall time does not move.
Why wall time missed pnpm#17500
pnpm 12.8.0 (a90ec21, "materialize imported files at the current umask") added a metadata read of the store file before every hardlink. On a hot store that roughly doubled the
statxcalls of an install. pnpm#17502 removed part of it. Each extra call hits a warm page cache and costs about a microsecond, so tens of thousands of them move a 1 s install by less than the comparison's 5% noise allowance. The information run below shows this today: main still makes 58% morestatxcalls than a candidate fix on the hot-store fresh restore, and the timing table reads "Within tolerance" (−2.1% pacquet, −5.3% pnpr).What changes
integrated-benchmark --count-syscallsruns every benchmarked install twice more after the timed runs. These runs are untimed, start from the same cleanup a timed run starts from, and execute understrace --follow-forks --summary-only. Each run writes<target>/SYSCALL_COUNTS.<round>.txt.run-integrated-benchmark.mjs: when HEAD and main are both benchmarked, passes--count-syscallsto the first run and stores the parsed counts inBENCHMARK_REPORT.jsonassyscalls. A missing or malformed strace table fails the run and names the file. The parser requires every row to parse and the rows to add up to thetotalrow.compare-integrated-benchmarks.mjs: adds a "Same-run syscall check" table after the "Same-run regression check" table. It gates about 30 file syscalls (stat family, open, link, copy, ioctl, getdents, mkdir, rename, unlink, chmod, symlink, readlink, access):syscallsfrom the JSON embedded in the summary.head_ref/main_refinputs toworkflow_dispatch, so two arbitrary revisions can be compared with the current harness. The harness always comes from the dispatched ref.vars.INTEGRATED_BENCHMARK_RUNNER, falling back toblacksmith-8vcpu-ubuntu-2404, so a fork without Blacksmith runners can run it. Nothing changes upstream.Thresholds
The negative run below compared 24 scenario/engine pairs and found no syscall within tolerance's reach of failing:
statxin fresh-install cold/cold for pacquet (1,640 calls on about 160k, 1.0%). Every other spread is under 0.3% or under 50 calls.access, a few hundredrename) from failing on scheduling-dependent retries.statx(+7%) for reverting perf(deps-restorer): stat a store file once for the hardlink mode check pnpm/pnpm#17502 alone, +28k (+58%) for main vs the candidate fix.Proof runs (fork,
ubuntu-latest)Positive: the gate fails on a reintroduced per-link stat
Run: https://github.com/jclaveau/pnpm/actions/runs/41084341826. HEAD is this branch plus a revert of pnpm#17502 (throwaway branch
ci/syscall-gate-proof-revert-17502). main is this branch. The check fails with 12 syscall regressions, allstatx, while the timing table reports every scenario within tolerance:Timing rows for the same scenarios in the same run:
I first tried the literal pair, a90ec21 against its parent 7679530. It cannot run with today's harness: the September pnpr binary rejects
--packument-ttl, and its revision mock never starts. That is why the proof reverts the remaining part of the regression instead.Negative: the gate passes on a neutral change
Run: https://github.com/jclaveau/pnpm/actions/runs/41084352182 (success). HEAD is this branch, main is
main. All 15 scenarios ran, and the syscall check reported no regression and no unstable row.Information: current main vs a candidate fix
Run: https://github.com/jclaveau/pnpm/actions/runs/41084361972. HEAD is 896dc10 (main after pnpm#17502), main is 2221b90 (jclaveau/pnpm
fix/hardlink-mode-check-per-source, a fix that reads the mode once per source file). It shows what pnpm#17502 left of pnpm#17500:In the same run the timing table shows -2.1% (pacquet) and -5.3% (pnpr) for the hot-store fresh restore, both "Within tolerance".
Tests
node --test .github/scripts/compare-integrated-benchmarks.test.mjs .github/scripts/run-integrated-benchmark.test.mjspasses 25 tests. They cover strace parsing, the 2% and 50-call boundaries, unstable runs, refusal of missing, partial or invalid counts, and the table rendering. Disabling each guard in turn fails at least one test.Refs pnpm#17500, pnpm#17502.
Assisted-by: Claude:claude-opus-5-5