Repository navigation
feat: measure benchmarks with and without request pipelining - #20
Conversation
- Add a --pipelining option to the suite, defaulting to 1,10, and pass it through the cloud toolkit as BENCH_PIPELINING - Publish both loads on BENCHMARKS.md and both READMEs, and name the charts after the pipelining count - Raise the published profile to 60 server processes, about 4 hours of load, and the GCP deadline check to 6 hours
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars. ⚙️ Run configuration
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Speed checkh2load sent Does this PR make uhttp slower?The job never fails on this table.
This PR makes uhttp 2.3% faster. uhttp after this PR was faster in all 10 rounds, by more than the 2.0% that the job treats as machine noise. How much slower is uhttp than uWebSockets.js?The job fails when uhttp after this PR is more than 5.0% slower in the median round.
After this PR, uhttp is 1.5% slower than uWebSockets.js, and before this PR, it was 3.6% slower. The job passes, because the limit is 5.0% slower. |
- Copy the request only when a handler first reads `c.req` after an `await`, so routes without middleware skip the copy on each request - Settle the return value of a route without middleware directly, without building a chain - Store the exchange flags as bits, and split `exchange.ts` into an `exchange/` directory with connection, header, and event helpers
Summary
--pipeliningoption selects the loads, and it defaults to1,10.BENCHMARKS.mdshows the pipelined figures under their own headings, and the README headline quotes the pipelined figure. The figures from the 19 October run are unchanged. Its charts now carry a-pipelining-10suffix.writeStatuscall, as uhttp does. Both sides of the check now send their headers the same way.BENCH_PIPELININGthrough to the suite. Its published-profile check now requires 6 hours of runtime, because the default run applies about 4 hours of load to 60 server processes.Testing
pnpm check,pnpm lint,pnpm typecheck,pnpm build, andpnpm testall passed in one run. That run came before the final wording edits to the READMEs andCONTRIBUTING.md.pnpm checkandgenerate.py --checkinbenchmarks/writeup. The output of the last rerun was not captured, so confirm it before merging.pnpm --dir benchmarks/suite bench:smoke) measured all three servers under both pipelining loads with no errors.pnpm nx run uhttp:speed) on an unpinned Mac, so the figures are noisy: uhttp served 228,592 requests a second and uWebSockets.js served 261,308, which makes uhttp 12.5% slower. That is over the 5% limit, so the Speed workflow is expected to fail. The CI run is the real measurement.BENCHMARKS.mdand the READMEs, so it runs only when a maintainer asks for new figures.