Skip to content

Size a fleet from page-load CPU per response at any request rate - #3

Open
mvanhorn wants to merge 1 commit into
Proa-Labs:mainfrom
mvanhorn:feat/fleet-size
Open

mvanhorn wants to merge 1 commit into
Proa-Labs:mainfrom
mvanhorn:feat/fleet-size

Conversation

@mvanhorn

@mvanhorn mvanhorn commented Oct 23, 2026 •

Copy link
Copy Markdown

Summary

Add fleet-size/ to translate a publication page-load capture into cores needed at chosen request rates:

cores = (CPU ms/response) × (target responses/s) / 1000

Optional --headroom (a fraction; 0.3 is 30%) and --max-cores to flag cells over a budget. This is a translation of the retained one-core CPU/response column, not a multi-core run.

Why

The HTTP capacity page only prints cores for 10,000 responses/s. A different rate, or a reserve on top of the measured CPU cost, currently means recomputing that table by hand. Keeping the formula on the publication capture, and refusing smoke or generator-limited files, makes the 10,000 responses/s table a special case of the same command.

How to try it

node --test fleet-size/fleet-size.test.mjs
node fleet-size/run.mjs
node fleet-size/run.mjs --target-rps 1000,10000,50000 --headroom 0.3 --max-cores 16

The default invocation matches the published 10,000 responses/s table. --json writes the structured plan. Exit status 2 means at least one cell exceeded --max-cores.

Notes

  • Quality CI runs node --test fleet-size/fleet-size.test.mjs.
  • Root README, BENCHMARK_PROTOCOL.md, and page-load/README.md point at fleet-size/.
  • Measured-source fingerprints are unchanged: no edits under package.json or the HTTP/renderer source lists.

Demo

demo

Translate a publication HTTP capture into cores needed at chosen
request rates, with optional headroom and a core budget.
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