bench/boundary: stream-shaped lanes (#68) - #81
Merged
Merged
Conversation
The rendezvous path had no regression instrument: nothing would catch a
regression in SharedStreamImpl copy mechanics, HostBuffer chunk
preservation, or the CABI bulk paths as exercised via GuestBuffer. Three
lanes, per the issue's table:
stream-sink async func(s: stream<u8>) -> u64 host->guest payload
stream-source async func(n: u32) -> stream<u8> guest->host payload
stream-pass async func(s: stream<u8>) -> stream<u8> host<->host after
identity transfer (A5)
Reported as MB/s (bytes moved / elapsed), medians of 5 timed runs after
a warmup, per-run byte-count assertions; chunk sizes 1200 B / 16 KiB /
256 KiB with per-size counts calibrated to tens-of-ms runs
(sweep.mjs STREAM_CONFIGS, box-calibrated like everything else here).
deltic lanes only — jco's p3 stream support is not under test; the lane
skips the stream rows with a note. Guest exports ride wit-bindgen 0.60
(wit_stream::new + spawn_local for the source; the sink drains via the
StreamReader; pass-through returns its input untouched), mirroring the
examples/guests fixtures.
README: shape table, methodology (including two footnotes from review —
stream-source allocates its payload inside the timed region, so
sink-vs-source deltas are not pure copy-direction cost; "size" means
write granularity for sink but host READ granularity for source/pass),
and a refreshed baseline from one consistent post-#63/#67 run — the
previous table mixed epochs (pre-#54-fix recv rows beside new stream
rows under one date). The recv @ 1200 rows now track the empty call
within ~1% and stay the #54 regression sentinel.
Implemented by a coder subagent against the #68 dispatch; reviewed
(methodology, embedder-API discipline — one in-flight op per end,
transfer-once, borrowed chunks — and territory) with advisories folded
in. Gates: just bench-boundary (with-jco for the baseline run); no
files outside bench/boundary/**.
Closes #68.
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.
Closes #68. Companion to #80 (the #67 bulk-copy PR); this one is bench-only.
Three stream lanes per the issue's table —
stream-sink(host→guest),stream-source(guest→host),stream-pass(host↔host after identity transfer, amendment A5) — measured as MB/s over 1200 B / 16 KiB / 256 KiB chunks, medians of 5 timed runs after warmup with per-run byte-count assertions. deltic lanes only; the jco lane skips stream rows with a note (its p3 stream support is not under test).The README baseline is refreshed from one consistent post-#63/#67
with-jcorun — the previous table mixed epochs (pre-#54-fixrecvrows beside new stream rows under one date header).recv @ 1200now tracks the empty call within ~1% and remains the #54 regression sentinel;stream-passbeats sink/source at every size, confirming the identity transfer touches no guest memory. Two methodology footnotes from review: the source lane's in-guest payload alloc, and the one-dimension/two-meanings chunk-size caveat.Implemented by a coder subagent; reviewed for methodology, embedder-API discipline (one in-flight op per end, transfer-once, borrowed chunks), and territory (nothing outside
bench/boundary/**). Gate:just bench-boundary(andwith-jcofor the baseline).