Repository navigation
test(remote-interop): measure image latency segment by segment on a weak link - #1380
Merged
Merged
Conversation
…eak link One picture on the remote link costs a host-side preview encode, two to three and a half round trips, and a client decode. This adds an ignored benchmark that measures each of those with production shapes: the real 1600 px preview encode (decode, Lanczos3 resize, JPEG q65 / PNG), the real 512-KiB chunked transfer through the real client, host and Core NATS with the weak-link fixture on the client leg only, and the client-side decode of the bytes that transfer delivered. Reported per cell as median, p95 and p99 over 20 repetitions, with 100-rep arms for the two representative payloads so a p99 is a percentile rather than the second-worst of 20, plus one lossy arm for the tail.
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.
What this brings
A measurement harness for the question "how long until a picture is on screen on a
remote link", split into the parts that can be measured on one machine and the parts
that cannot.
tests/remote-interop/tests/image_latency.rsmeasures three segments separately,so a slow picture can be attributed instead of guessed at:
re-encode (JPEG q65 / PNG) that
host/src/remote_host/files.rsperforms, repeatedin
--releasebecause this crate depends on the remote protocol crates and not onfuture-host;a real Core NATS broker, with delay and loss injected on the client's leg only;
imagecrate version the host uses.WebView/GPU upload, frame composition and scan-out are named in the module docs as
not measured rather than estimated. The two measured benchmarks are
#[ignore]d(they build multi-megapixel sources and open real sockets); the sampling helpers they
share run as ordinary unit tests.
Supporting changes:
tests/remote-interop/Cargo.tomlgains animagedependency(PNG + JPEG only) and the
image_latencytest target, which requires the existingnetwork-testsfeature like the other interop executables;Cargo.lockfollows.Commits
Verification
Run locally at
a08d04b67with the pinned toolchain (rustc/clippy 1.99.1):cargo fmt --all -- --check→ cleancargo test -p future-remote-interop --features network-tests --test image_latency→6 passed, 0 failed, 2 ignored (the two ignored ones are the opt-in benchmarks)
cargo clippy -p future-remote-interop --features network-tests --all-targets -- -D warnings→ one
clippy::type_complexityerror intests/remote-interop/src/server_host.rs:192,a pre-existing condition: that file is byte-identical to
main, and thefeature-gated interop lint only runs in the opt-in
Misc → remote-interopsuite,never on a PR or push. Left untouched here rather than mixed into a measurement PR.
Notes
The new test target does not run in PR CI: like the other interop executables it is
gated behind
network-tests, andscripts/ci/remote-checks.mjsruns only the--libandrust_client_servertargets. It is a measurement tool, invoked by hand.