Skip to content

chore(perf): cperf regression harness + scale-validate rig + capacity docs (6/6)#1335

Open
yyyyaaa wants to merge 1 commit into
feat/scale-s5-pooling-integrationfrom
feat/scale-s6-perf-tooling
Open

chore(perf): cperf regression harness + scale-validate rig + capacity docs (6/6)#1335
yyyyaaa wants to merge 1 commit into
feat/scale-s5-pooling-integrationfrom
feat/scale-s6-perf-tooling

Conversation

@yyyyaaa

@yyyyaaa yyyyaaa commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

PR 6/6 of the #1325 split. Tooling and documentation only — zero runtime code. This is the apparatus that produced every number cited in PRs 2–5, landed so the results are reproducible and future regressions are catchable. Large by line count (~14k), but inert: a new never-imported workspace package, standalone scripts, and markdown.

packages/perf-harness (cperf)

Reusable perf/regression CLI:

  • fleet: tenant provisioning/teardown factories, canary seeding, drift detection against a fleet manifest.
  • load: authenticated zipf traffic harness, eviction-churn driver.
  • measure: per-instance retained heap via heap-snapshot analysis, PG-side memory sampler, JSON-line collector.
  • regression: scenario matrices with baselines + compare (the deep-scenario suites covering the corrected scaling axes from the validation program).
  • run/report: ramp/soak/soakOps runners, merge/summarize, capacity prediction from the sizing model.

21 jest suites / 199 tests over the pure logic (histograms, seeded RNG, fleetfiles, merge/summarize, scenario shapes, SQL builders).

Related: #1304 carries shape-variant perf scenarios under graphql/server-test/perf/ that are worth harvesting into cperf so we maintain one harness (proposed on that thread).

scripts/scale-validate

The V1–V4 validation rig used for #1325: plans, drivers, samplers, summarizers. Kept as scripts rather than a package on purpose — they orchestrate a live fleet against a dedicated PG and document the exact invocations used. Credentials are env-only (PERF_PASSWORD); rig output artifacts are gitignored.

  • SIZING.md — the catalog-driven capacity model: heap-aware instance budget, the R(H) law with worked examples, the measured constants (filtered instance ~15MB vs unfiltered ~1.3GB at 61k pg_class), heap floor 1024MB guidance, and shard math.
  • VALIDATION-REPORT.md / V2-RESULTS.md — the findings ledger: every crash, its root cause, the fix, and the verdicts (47-tenant headline run, eviction-churn storm, the 24h-soak OOM root cause, governor reachability).

Testing

packages/perf-harness 199/199 (21 suites) · full monorepo root build green at this tip.

Stack

Stacked on #1334 (feat/scale-s5-pooling-integration); merge last. Full stack map in #1330. Extracted from #1325 (kept open as the validated reference).

🤖 Generated with Claude Code

https://claude.ai/code/session_0122xqM2VkNbuAmZshK1YNSb

… docs

Tooling + documentation only — zero runtime code changes. This is the
apparatus that produced every number cited in this stack, landed so the
results are reproducible and regressions are catchable.

packages/perf-harness (cperf):
- Reusable perf/regression CLI: fleet provision/teardown (tenant factories,
  canary seeding, drift detection), load harness (authenticated zipf traffic,
  churn driver), measurement (per-instance retained heap via heap snapshots,
  PG-side sampler, JSON-line collector), regression suites with baselines +
  compare, ramp/soak/soakOps runners, capacity prediction from the sizing
  model. 21 jest suites over the pure logic (histograms, RNG, fleetfiles,
  merge/summarize, scenario matrices).

scripts/scale-validate:
- The V1-V4 validation rig used for #1325: plans, drivers, samplers,
  summarizers. Kept as scripts (not a package) — they orchestrate a live
  fleet against a dedicated PG and document the exact invocations used.
- SIZING.md: catalog-driven capacity model — the heap-aware instance budget,
  the R(H) law with worked examples, shard guidance, and the measured
  constants (filtered instance ~15MB, unfiltered ~1.3GB at 61k pg_class).
- VALIDATION-REPORT.md / V2-RESULTS.md: findings ledger V1-V4 — every crash,
  root cause, fix, and the final verdicts (47-tenant headline run; churn
  storm; 24h-soak OOM root cause; heap floor 1024MB guidance).

.gitignore: rig output artifacts (fleet manifests, metrics.jsonl, perf-out).

Extracted from #1325 (commits 2eeaefb, f138573, e545965, 143f479,
8eec3cd, aeb8c35, acc035c, f95d59f and the rig fix-ups).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0122xqM2VkNbuAmZshK1YNSb
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