Skip to content

docs: review perf methodology and plan replacement harness - #526

Merged
derduher merged 6 commits into
masterfrom
claude/performance-measurement-analysis-9fe841
Oct 19, 2026
Merged

derduher merged 6 commits into
masterfrom
claude/performance-measurement-analysis-9fe841

Conversation

@derduher

@derduher derduher commented Oct 19, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

  • Adds docs/performance/methodology-review.md, which lists 17 problems with how tests/perf.mjs measures performance. Four of them produce wrong numbers: passing false turns on memory mode, an unknown test name silently runs stream, memory mode reports the process's lifetime peak RSS, and failed runs still count as samples.
  • Adds docs/performance/measurement-plan.md, which defines the key metrics (throughput, memory growth with input size, peak memory, CPU time per item, validation overhead, startup time) and how to measure each one. The plan builds on hyperfine 2.x to run each scenario in fresh processes and Bencher to track history, flag regressions and report on pull requests, including PRs from forks. Custom code is limited to scenario scripts, a hyperfine-to-Bencher converter, a local before-and-after comparison, and a heap-capped bounded-memory check. It lays this out in six phases.
  • Points CLAUDE.md at both docs, so agents don't trust npm run test:perf numbers.

Docs only; no code changes.

Test plan

  • I ran tests/perf.mjs to confirm the flag-parsing bugs and the monotonic RSS readings that the review describes.
  • npm test passes (pre-commit hook).
  • I checked hyperfine 2.0.0's JSON fields and Bencher's adapter and GitHub Actions docs against the plan.

🤖 Generated with Claude Code

derduher and others added 6 commits October 19, 2026 17:01
Document the methodology problems in tests/perf.mjs, define the key
performance metrics and how to measure them, and lay out a phased plan
for a replacement benchmark runner.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Take the memory baseline before fixture setup, move the bounded-memory
check to a heap-capped script outside npm test, bootstrap at the process
level, align Phase 1 scope with the review, keep CLAUDE.md in step with
the phases, and link review line references to a fixed commit.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Bound Buffer memory as well as the V8 heap, stream large generated
inputs from a separate process, run 10 processes for the process-level
bootstrap, remove memory mode in Phase 1, and keep the CLAUDE.md note
warning against before/after comparisons until Phase 4.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Move the A/A noise-floor criterion to Phase 4, write CI comparisons to
the job summary, keep the bench:compare pointer in Phase 6, generate bare
URLs in-process, and add split-and-index to the bounded-memory check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Use hyperfine (2.x JSON) to run each scenario in fresh processes and
record wall time, CPU time and peak RSS, and Bencher to track history,
apply t-test thresholds and report on pull requests, including the
workflow_run pattern for forks. Custom code shrinks to scenario scripts,
a BMF converter, local A/B comparison and the bounded-memory check.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@derduher
derduher merged commit 15cce38 into master Oct 19, 2026
22 checks passed
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