Repository navigation
benchmark: report latency percentiles in http benchmarks - #67001
Open
bruno-buuhvprojects wants to merge 1 commit into
Open
bruno-buuhvprojects wants to merge 1 commit into
bruno-buuhvprojects wants to merge 1 commit into
Conversation
Collaborator
|
Review requested:
|
Contributor
|
Welcome to Node.js, and thank you for your first contribution! Before review, please take a moment to read:
Please make sure every commit is signed off. For a first pull request, GitHub Actions require collaborator approval and Jenkins CI must be started by a collaborator or triager, so an initial wait is normal. |
The http benchmarks only reported throughput, although autocannon already computes latency percentiles and wrk can print them. Tail latency under load is invisible in the results, so changes that affect it cannot be measured with the benchmark suite. Parse p50, p90, p99 and p99.9 from autocannon, wrk (with --latency) and the test double, pass them along as an optional `latency` field of the report, and print them in the simple output format. The CSV output and the comparison tools are unchanged. Signed-off-by: Buuh Uchiha <[email protected]>
bruno-buuhvprojects
force-pushed
the
benchmark-http-latency
branch
from
October 25, 2026 11:23
928c987 to
ec2f1d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The http benchmarks only report throughput, so a change that affects tail
latency under load can't be seen in the results. autocannon already computes
latency percentiles and
wrk --latencyprints them, but_http-benchmarkers.jsonly reads the requests per second.This PR parses p50, p90, p99 and p99.9 from autocannon, wrk (also wrk2 output)
and the test double, passes them as an optional
latencyfield in the report,and prints them in the simple output format:
The CSV output,
compare.js,scatter.jsand the R scripts are unchanged.run.jsdoesn't requirecommon.js(loading it spawnswrk -handautocannon -h), so the formatting is repeated there, like the rateformatting already is.
Known limits: autocannon records whole milliseconds, and h2load reports no
percentiles.
If this direction is fine, a follow-up could add
compare.js --metric=p99anda constant-rate option mapped to
autocannon -R, which corrects forcoordinated omission.
How I verified
bench.http(http, https, http2) throughbenchmark/run.js testwith the test double.http/simple.jswith autocannon and checked the CSV output is unchanged.eslintandlint-mdpass on the changed files.I couldn't run the full test suite, since it needs a binary built from main.
AI disclosure
I used a coding agent to help write this change. I reviewed the diff, ran the
checks above myself, and can explain the implementation.