perf: unify benchmark workloads - #1944
Benoît Cortier (CBenoit) wants to merge 13 commits into
Conversation
There was a problem hiding this comment.
The PR folds the standalone benches crate into ironrdp-bench, fixes a real rfx_enc stride bug, uses representative nonzero fixtures with black_boxing and output checks, and adds manifest-qualified partial-replay workloads with strict preflight verification and a single-execution standalone measurement. Independent review found no correctness, safety, protocol, or API defects; behavior changes are intentional and well validated. Published findings are low-severity tooling cleanups: an unused bytesize dependency, a speculative public prepare_from_cache wrapper, a tautological usage test, manifest-validation logic duplicated from xtask, and a hardcoded workload list that can silently diverge from manifest performance entries. The derivable-criterion-string candidate is rejected because the manifest-declared exact Criterion identity is an intentional, README-documented validation feature, and the candidate itself concedes the tradeoff.
There was a problem hiding this comment.
🟡 Changes recommended
Criterion repeats expensive preflight work, and Tokio features are implicitly supplied by transitive dependencies.
Once you've addressed the issues Copilot identified, you can request another Copilot review.
Pull request overview
Centralizes shared benchmark workloads in ironrdp-bench, adds qualified capture-replay measurements, and strengthens codec and bulk benchmarks.
Changes:
- Adds strict Criterion and standalone capture-replay workloads.
- Moves
perfencintoironrdp-bench. - Improves graphics and bulk benchmark fixtures and validation.
File summaries
| File | Description |
|---|---|
xtask/src/main.rs |
Dispatches capture-replay benchmarks. |
xtask/src/cli.rs |
Adds the capture-replay command. |
xtask/src/bench.rs |
Parses and validates performance workloads. |
xtask/README.md |
Documents benchmark workflows. |
crates/ironrdp-server/src/encoder/rfx.rs |
Exposes encoded output sizes. |
crates/ironrdp-bulk/benches/bulk_compression.rs |
Separates cold, history, and passthrough cases. |
crates/ironrdp-bench/src/replay.rs |
Implements qualified replay preparation and validation. |
crates/ironrdp-bench/src/lib.rs |
Exports shared workloads. |
crates/ironrdp-bench/src/bin/perfenc.rs |
Adds the relocated server-encoding benchmark. |
crates/ironrdp-bench/src/bin/capture_replay_bench.rs |
Adds standalone strict replay measurement. |
crates/ironrdp-bench/corpus.toml |
Qualifies two performance captures. |
crates/ironrdp-bench/Cargo.toml |
Registers dependencies and benchmark targets. |
crates/ironrdp-bench/benches/capture_replay.rs |
Adds Criterion replay benchmarks. |
crates/ironrdp-bench/benches/bench.rs |
Improves graphics fixtures and output checks. |
Cargo.toml |
Removes the legacy benchmark workspace member. |
Cargo.lock |
Updates benchmark package dependencies. |
benches/src/perfenc.rs |
Removes the old benchmark binary. |
benches/Cargo.toml |
Removes the legacy package manifest. |
ARCHITECTURE.md |
Documents the consolidated benchmark package. |
AGENTS.md |
Updates benchmark placement guidance. |
Review details
- Files reviewed: 19/20 changed files
- Comments generated: 3
- Review effort level: Balanced
219b3f3 to
deee19a
Compare
There was a problem hiding this comment.
🟢 Approval recommended
The benchmark migration, validation contracts, tests, and documentation are internally consistent with no blocking issues identified.
Review details
- Files reviewed: 19/20 changed files
- Comments generated: 0 new
- Review effort level: Balanced
45517f8 to
aa7b2bf
Compare
aa7b2bf to
73a0c7b
Compare
73a0c7b to
514ed04
Compare
Move the server encoding binary into the benchmark package and make\nits whole-process workload validate encoded output.\n\nDistinguish supported bulk compression streams from intentional\n16 KiB passthrough behavior, and use representative graphics fixtures.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reject skipped compression and empty encoder output while running\nfocused benchmark workloads.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse prepared replay state for verified partial-capture processing\nbenchmarks and whole-process measurements.\n\nKeep codec setup outside focused timing and report history throughput\nfor every processed packet.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Preflight only the selected capture and hash its output outside\nfocused processing timing.\n\nKeep the standalone selector strict in one replay execution.\n\nCo-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use manifest-declared eligibility and Criterion identities so invalid capture selectors fail before launching a no-op benchmark. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Record the consolidated benchmark package and remove obsolete root benchmark references. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Remove unused benchmark code and verify that Criterion workloads match manifest-qualified captures. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Use unique temporary files for concurrent EOF and truncation tests. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Keep perfenc fixture-isolation tests compliant with workspace lints. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Document perfenc aggregate output validation accurately. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Load verified replay captures from the dedicated benchmark data root. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Reuse verified preflight packets and the shared replay-summary contract. Validate encoder dimensions once at startup and reject unconsumed CLI input. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
514ed04 to
b469c74
Compare
|
This pull request may overlap with #1943. Both add headless capture replay of qualified RDP captures, including a CLI to run a single capture and preflight verification, building on the same corpus/manifest approach. This notice is advisory only. Automated review continues as usual, and how these pull requests relate is for maintainers and authors to decide. Note LLM-assisted content (no human feedback). |
Match the private corpus-manifest boundary inherited from replay qualification changes. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Consolidate graphics, bulk, server encoding, and qualified partial replay workloads under
ironrdp-bench.Keep each selected replay workload independently preflighted and identifiable, with strict framebuffer fingerprints outside focused Criterion timing and a strict single-execution standalone measurement.
Co-authored-by: Copilot App 223556219+Copilot@users.noreply.github.com