Repository navigation
bench: measure InboundDispatch and OutboundRoutes (design 054 §5) - #282
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Stage 7 of the 054 implementation plan (a checkpoint). It puts
InboundDispatchandOutboundRoutesunder the allocation gate and adds an informational timing bench for the outbound wake-up path.Change
b0_alloc_connector: nine new rows. The old rows stay until stage 16.EXPECTEDanddata/baselines/b0_alloc_connector.jsonare updated together; the baseline diff only adds lines, so the old rows are unchanged.inbound_dispatchinbound_dispatch_patterninbound_dispatch_keyed_knowninbound_dispatch_keyed_newoutbound_next_static_topicoutbound_next_written_topicoutbound_next_ownedoutbound_next_round_robin(8 routes, all ready)outbound_next_parked(every pull parks and is woken)In the parked row, the transport pulls in its own task, and the producer writes one value and yields until it has been pulled. The transport calls
next()again before the next value exists, so every pull after the first parks and is woken.New
b1_outbound_wakeup: informational, registered inaimdb-bench/Cargo.toml, not part ofbench-gate. It is ported from the spike's parked scenario:Reader::recv(nopump_sink, so it still compiles after stage 16) andOutboundRoutes::next.Timing check: please rerun on a quiet host
The plan's bounds, from one run:
OutboundRoutesat 256 routes within 10 % of its 8-route figure.The one clean local run (devcontainer):
A same-host run of the spike's bare bitmap (copied in temporarily, not committed) gave 617 ns at 8 routes against
OutboundRoutes' 640 ns. That suggests serialization and staging add only about 20 ns, and that most of the gap is this host rather thanOutboundRoutes. Later runs were unusable because other builds loaded the host (spreads up to 5.7 µs), so this isn't settled.To rerun:
If bound 2 still misses on a quiet host, the plan says the cause is in stage 6b's hot path, and it gets fixed there before stage 8.
Timing rerun (cloud sandbox)
b1_outbound_wakeup, one busy route among N, current-thread runtime, ns per message (median, range of 5 runs), 0 allocations per message in every cell:make bench-gatein the sandbox: all 17 rows at target. (The sandbox first neededgit submodule update --init --recursive; the CIbench-gatejob already checks out submodules recursively.)Verification
make bench-gate: passes with all 17 rows at target.cargo clippy -p aimdb-bench --all-targets -- -D warningsandcargo fmt --all --check: clean.feat/054-connector-boundary.🤖 Generated with Claude Code