Repository navigation
feat(bench): per-arch baselines, matrix/pgo tasks, methodology doc [W0-12] - #917
Conversation
…0-12]
Add benchmarks/baselines/{amd64,arm64}.json (ns/op trend-only, B/op and
allocs/op gated) with a scripts/perf/baseline checker and -update flag,
task bench:matrix, bench:baseline, bench:baseline:update and pgo:refresh,
docs/PERFORMANCE_METHODOLOGY.md, and one consolidated wave-0 CHANGELOG
entry. performance_baselines.json and TestPerformanceRegression are
documented as a smoke test only; its two never-enforced entries are removed.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @ajitpratap0's task in 22s —— View job Review of PR #917 (per-arch baselines, tasks, methodology doc)I read Overall: the design is sound. It gates the deterministic metrics (allocs/op and B/op), keeps ns/op as trend-only, and refuses to check against an empty baseline. I found no blocking issues. The points below are things I'd consider before merging. Potential issues
Code quality
Tests and docs
SecurityNothing of concern: no shell interpolation, no network access, and file paths come from flags in a developer tool. |
Perf gate: PASS (shadow mode: report only, this check never fails)Base
Rules: time regresses at >= +3% with p < 0.01 (Mann-Whitney U), or a suite geomean >= +1.5% (per-round geomeans, same test); allocs/op must not increase; B/op must not rise more than 2%; instructions/op must not rise more than 1.5%. An A/A control with more than 10% of benchmarks moving over 3% is noisy: re-run once, then inconclusive (neutral). Gated suite (GOGC=off, GOMAXPROCS=1)
A/A control: 0 of 26 benchmarks moved more than 3%. Instructions per operation (cmd/perfdriver)
Secondary metric: default GC, GOMAXPROCS=1 (informational)
Environmentbenchstat (primary metric) |
… matrix, doc fixes [W0-12] Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
|
Claude finished @ajitpratap0's task in 25s —— View job Review of PR #917 (per-arch baselines, tasks, methodology doc)I read Overall: the design is sound and I found no blocking issues. It gates the deterministic metrics (allocs/op and B/op), keeps ns/op trend-only, refuses an empty baseline, and rejects a Corrections to the earlier automated review
Potential issues
Code quality
TestsThe test plan covers the important edges: median parsing, the ±2% boundary, an empty baseline, and the update-then-check round trip. I'd add two cases:
HousekeepingThe CHANGELOG entry still needs #910 and #914 appended when they merge. Consider a checklist item on those PRs so it isn't forgotten. SecurityNothing of concern: no network access, no shell interpolation, and the paths come from developer-tool flags. |
…y docs [W0-12] -update -input now requires -go-version and records external provenance instead of stamping the local toolchain. Re-record arm64.json with go1.26.9, drop the stale tolerance advice from PERFORMANCE_TUNING, and state that bench:baseline is local until W0-13. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
|
Claude finished @ajitpratap0's task in 17s —— View job Review of PR #917 (per-arch baselines, tasks, methodology doc)I re-read Overall: I found no blocking issues. Allocs/op and B/op are gated and ns/op is trend-only. An empty baseline is refused. A live run fails when the baseline is stale, and Several points from the earlier automated reviews are already handled in the code:
Remaining issues
TestsI'd add two cases:
HousekeepingThe CHANGELOG entry still needs #910 and #914 appended when they merge. SecurityNothing of concern: |
…n CHANGELOG Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
|
Claude finished @ajitpratap0's task in 21s —— View job Review of PR #917 (per-arch baselines, tasks, methodology doc)I read Overall: I found no blocking issues. The design gates the deterministic metrics (allocs/op and B/op) and keeps ns/op as trend-only. An empty baseline is refused. A live run fails when the baseline is stale. Some points from the earlier automated reviews no longer apply, or never did:
Remaining issues
TestsI'd add two cases:
HousekeepingThe CHANGELOG entry still needs #910 and #914 appended when they merge. SecurityNothing of concern. |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
…docs # Conflicts: # CHANGELOG.md
|
Claude finished @ajitpratap0's task in 18s —— View job Review of PR #917 (per-arch baselines, tasks, methodology doc)I read Overall: I found no blocking issues. The design gates allocs/op and B/op, keeps ns/op trend-only, and refuses an empty baseline. A live run fails when the baseline is stale. Already handled (no action needed)
Remaining issues
Nits
TestsI'd add two cases:
SecurityNothing of concern. |
Resolves the CHANGELOG.md [Unreleased] conflict with #917 (W0-12) by keeping both its ### Added block and the W0-15 ### Changed block. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
…trix reports [W0-15] Review fixes after merging #917 (W0-12): - task bench:matrix sets GOMEMLIMIT=64MiB next to GOGC=off; the GOMEMLIMIT lint now understands YAML env blocks with the keys on separate lines. - docs/PERFORMANCE_METHODOLOGY.md documents GOMEMLIMIT and its effects (GC share in time and Ir/op, pool drains), the pinned PERF_GO_VERSION, the matrix and profile (cachegrind) dispatch modes and ratio-only reports. - scripts/perf/baseline keeps GOGC=off without GOMEMLIMIT on purpose (it gates absolute allocs/op and B/op, exact only without pool drains), drops an inherited GOGC/GOMEMLIMIT, and is covered by the lint through an explicit, file-restricted exemption marker. - ab.sh comment on allocs/op corrected: the limit lets GC and pool drains run; allocs/op stays exact for the gated suite only. - Matrix dispatch: job "Matrix A/B (report only)", report heading "Matrix A/B: VERDICT (report only, not a gate verdict)" via ab.sh -T and gate -report-only/-title. - PERF_GOMEMLIMIT / the gomemlimit input are validated up front (perf_check_gomemlimit) instead of every benchmark binary panicking. - ab.sh die() no longer appends the exit code to its message. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2
Summary
benchmarks/baselines/{amd64,arm64}.json: ns/op trend-only, B/op and allocs/op gated.scripts/perf/baselinechecks (task bench:baseline) or rewrites (task bench:baseline:update,-update) them over the gated suite (scripts/perf/gate-suite.txt, GOGC=off, -cpu 1, medians). arm64 recorded on an M-series machine withGOTOOLCHAIN=go1.26.9 task bench:baseline:update(go_version go1.26.9, the toolchain CI uses; 26 benchmarks); amd64 is intentionally empty until checkpoint C0 (W0-13) and the check refuses an empty baseline.-update -input(recording from CI output) now requires-go-versionand records that toolchain plus an external-provenance comment, instead of stamping the localruntime.Version().bench:matrix,bench:baseline,bench:baseline:update,pgo:refresh.bench:compare,bench:ab,bench:gatealready existed.performance_baselines.json/TestPerformanceRegressionretained as a documented smoke test only; the never-enforcedTokenizationThroughputandEndToEndSustainedentries are removed. CLAUDE.md updated; PERFORMANCE_TUNING.md rewords the regression section as a smoke test that points at the methodology doc.docs/PERFORMANCE_METHODOLOGY.md: method, running an A/B, how the gate decides, claims policy (PLAN 1.5/D19).[Unreleased]entry listing merged W0 PRs feat(bench): corpus manifest and benchcorpus loader [W0-01] #895 test(timing): replace wall-clock assertions with ratio and count checks [W0-00b] #899 fix(parser,tokenizer): ClickHouse/Snowflake lambda bodies and U& in dialects without & [W0-00a] #901 perf(bench): interop benchmarks and size budget [W0-08] #908 test(bench): server-shape benchmarks, alloc budgets, stack-depth test, frame script [W0-04] #909 test(bench): high-level, render and transform benchmark matrix [W0-05] #911 test(transpiler): add TranspileRW/Shape benchmarks and prefilter differential test [W0-07] #912 test(bench): tokenizer and parse-stage benchmark matrix [W0-03] #913 test(goldens): behaviour goldens over every corpus and dialect [W0-02] #915 ci(perf): interleaved A/B perf gate in shadow mode [W0-09] #916 test(bench): lint, security and LSP benchmark matrix [W0-06] #910 feat(bench): expand competitor harness with peers, cells and schema v2 [W0-10] #914. test(bench): lint, security and LSP benchmark matrix [W0-06] #910 (W0-06) and feat(bench): expand competitor harness with peers, cells and schema v2 [W0-10] #914 (W0-10) were added after they merged.Test Plan
task check: passtask test:cbinding: passgo test -count=1 ./pkg/compatibility/...: passgo run honnef.co/go/tools/cmd/staticcheck@latest ./scripts/perf/baseline ./pkg/sql/parser: cleango test -race -count=1 ./scripts/perf/... ./pkg/gosqlx ./pkg/sql/parser: pass (TestPerformanceRegression passes)scripts/perf/baseline/baseline_test.go): median parsing, alloc +1 caught, B/op exactly +2% allowed and +2.1% caught, 9x ns/op not gated, update-then-check round trip, injected alloc regression caught, empty baseline refused, committed files validate.GOTOOLCHAIN=go1.26.9 task bench:baselineon arm64 right after the re-record:ok: 26 benchmarks.TestUpdateFromInputDoesNotStampLocalToolchain(-update -inputwithout-go-versionis rejected; the given version is recorded).-cpu 1(-g), and-cpu 4runs only intask bench:profileand the competitor harness; CHANGELOG cites feat(bench): per-arch baselines, matrix/pgo tasks, methodology doc [W0-12] #917.task bench:matrixandtask pgo:refreshsmoke-run locally (generateddefault.pgonot committed).-inputrejects agoarch:header differing from-arch; a go_version major.minor mismatch warns. New tests: disjoint run fails, Verdict staleness, goarch mismatch, SameGoMinor.bench:matrixhas pipefail and writes to gitignored.bench/matrix.txt.task bench:gate(local, 10 rounds, merge-base vs HEAD):gate: verdict pass, to be read next to this PR'sA/B perf gate (shadow)CI verdict (PLAN W0-12 acceptance: local gate reproduces CI).Breaking Changes
None.
performance_baselines.jsonkeeps its shape (two unused entries removed,purposefield added).🤖 Generated with Claude Code
https://claude.ai/code/session_01DnbRnTFErhoMJdAjVEeCg2