feat: add end-to-end benchmark for contact-book-manager app#89
Merged
Conversation
Add a criterion-based benchmark that compiles the real contact-book-manager templates into a protocol binary and measures performance across three areas: - Protocol deserialization (from_protobuf) - Handler rendering without plugin at 10/100/1000 contacts - Handler rendering with FastHydration plugin at 10/100/1000 contacts The protocol is built from live source at benchmark time so any template change is automatically reflected in the next run. A summary table with Iters, Avg, Min, Max, Dev%, P50, P90, P99, IQR, and output Bytes is printed after criterion finishes. Also adds: - Benchmark validation step to cargo xtask check (--test mode) - 'webui' target to cargo xtask bench - benches/README.md with usage, result interpretation, and regression detection guidance Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
Author
|
Output when run with command: |
Contributor
Author
|
Fixes #69 |
mohamedmansour
approved these changes
Mar 12, 2026
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.
Add a criterion-based end-to-end benchmark that compiles the real contact-book-manager templates into a protocol binary and measures performance across three areas:
WebUIProtocol::from_protobuf()throughputKey design choices
webui::build()at benchmark time fromexamples/app/contact-book-manager/src/. No cached binary template changes are automatically reflected in the next run.state.jsonschema.Quality gate integration
cargo xtask checknow includes a bench (validate) step that runs--testmode (compile + one iteration per benchmark) to catch breakage early.cargo xtask bench webuiruns the full contact-book benchmark with measurements.Files changed
crates/webui/benches/contact_book_bench.rscrates/webui/benches/README.mdcrates/webui/Cargo.toml[[bench]]xtask/src/main.rswebuibench targetCargo.lockRunning