Repository navigation
Fix benchmark post: first chunk copy - #1350
Conversation
Actual implementation was not copying the first chunk if it was not the last one.
Benchmark:
|
| Scenario | Base req/s | Head req/s | Head / base | Rounds | Noise | Busy | CPU per request |
|---|---|---|---|---|---|---|---|
| http/hello-world | 168838 | 167412 | 0.994x (-0.6%) | 0.99 to 1.00 | ±1.2% | 100% / 100% | 5.91 / 5.97 us (1.007x) |
| http/headers | 139108 | 138554 | 0.997x (-0.3%) | 0.99 to 1.00 | ±0.8% | 100% / 100% | 7.18 / 7.21 us (1.003x) |
| http/json-post | 126799 | 126639 | 0.997x (-0.3%) | 0.99 to 1.00 | ±1.5% | 100% / 100% | 7.88 / 7.89 us (1.003x) |
| http/cached | 191047 | 191620 | 1.004x (+0.4%) | 1.00 to 1.01 | ±0.5% | 100% / 100% | 5.23 / 5.22 us (0.996x) |
| ws/echo-20b | 175107 | 173986 | 0.996x (-0.4%) | 0.99 to 1.00 | ±1.0% | 100% / 100% | 5.71 / 5.74 us (1.004x) |
| ws/echo-4kb | 154292 | 155488 | 1.008x (+0.8%) | 1.00 to 1.01 | ±1.0% | 100% / 100% | 6.48 / 6.43 us (0.992x) |
4 rounds of 3s per scenario, each round loading base, head and a second process of each one, from a copy of its build, after the other, in an order that changes every round. "Head / base" is the median of the per-round ratios of req/s and "Rounds" their range. "Noise" is how far base/base and head/head, the same code on both sides, got from 1 in this same run: that is what the machine did, so a row is marked only when the median moved further than that, at least 2%, and every round moved the same way: 👀 slower, 🏆 faster. "Busy" is the cpu time of the server process over the round and "CPU per request" that time divided by the requests it answered, with the head/base ratio judged against its own same-code band and bold when it cleared it. When busy is well under 100% the load generator set the pace, the req/s are its and the cpu per request is the column to read. Only the ratios are comparable across runs, the absolute figures depend on the runner.
Node v26.10.0, INTEL(R) XEON(R) PLATINUM 8573C, 4 cores (server on cpu 0, load on 2,3), http_load_test and load_test with 100 connections.
Actual benchmark POST scenario was not copying the first chunk if it was not the last one.