The published figure was -3.9%. It was measured sequentially rather than
interleaved, and the machine drifts 12% across a session as it warms, so run
order was indistinguishable from effect. Two later attempts to correct it were
also wrong: 0.8% had the same flaw, and -6.8% compared 7bd11bf against HEAD,
which differ by observability *and* three performance fixes pulling the other
way, then reported their net as if it were one of them.
Measured properly, alternating round by round between 7bd11bf and 523e318 (the
last commit before those fixes): +7.0% of the framework's own per-request work,
about 0.29us, roughly 2% of a request over a real socket. Ranges do not overlap.
The guide no longer quotes absolute throughput from this laptop. The reference
numbers come from a two-box setup, and single-box loopback figures invite a
comparison that is not valid.
D7's shape survives: the cost is fixed per request, not per step, because
per-step work is skipped when nothing subscribes.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
D7 predicted ~0.25% per step and called it invisible. Measured over a real
socket it is -3.9% on JSON hello and -2.1% on a three-step pipeline: the route
with *fewer* steps loses more, which falsifies a per-step model rather than
just its constant. Per-step work is skipped when nothing subscribes, so what
remains is a fixed per-request cost that a shallow route amortises over less.
The decision survived, for a better reason than it was made with: there is
nothing per-step left to make optional.
Also records the two regressions that measurement caught and reasoning did not,
both larger than anything the design anticipated — a second async frame in
handle() at 0.43us per request, and a closure allocated per request inside
correlateRequest at 0.16us. On this path an extra promise costs more than any
amount of bookkeeping.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
Eight tasks from the reviewed design, ordered so the correction lands before
anything consumes it — a logger built on uncorrelated events would grow its own
notion of request identity, which is the failure the design exists to prevent.
Two placement details worth having settled in writing. requestId is generated
in the adapters rather than in handle(), because both read and size-check the
body first, so a 413 never reaches handle() — generating there would leave
exactly the failures an operator most wants to correlate without an id. And
step timing takes N+1 timestamps for N steps, since one step's end is the next
one's start; the design measured that against the naive 2N.
Task 7 benchmarks the hot path and says outright that if the measurement
disagrees with D7, the design changes rather than the number being quietly
kept.
Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>