feat: add comprehensive criterion benchmarks across all core crates#64
Merged
mohamedmansour merged 2 commits intomainfrom Mar 5, 2026
Merged
feat: add comprehensive criterion benchmarks across all core crates#64mohamedmansour merged 2 commits intomainfrom
mohamedmansour merged 2 commits intomainfrom
Conversation
Add realistic, real-world benchmark suites for all performance-critical crates in the workspace, modeled after actual WebUI template patterns from the example apps. Parser benchmarks (webui-parser): - Add 4 realistic template builders: todo-app root page, shadow-DOM component, text-heavy article, and mixed-directive dashboard. - Add parser_realistic and parser_text_vs_directive benchmark groups. - Keep all 5 existing synthetic benchmark groups for regression tracking. Handler benchmarks (webui-handler): - Add handler_loop_scaling: vary array size from 10 to 2000 items. - Add handler_condition_variety: identifier, predicate, negation, and compound AND/OR conditions with true/false/mixed state. - Add handler_nested_components: 3-level component hierarchy (root, app, item) with 50 loop iterations. - Add handler_state_depth: flat through 5-level nested state lookups. Protocol benchmarks (webui-protocol): - Add medium protocol (6-fragment todo-app equivalent). - Add parametric large protocol generator (dashboard with N panels). - Add protocol_size_sweep: serialize/deserialize at 5, 15, 30, 50 panel counts to measure scaling. Expression benchmarks (webui-expressions) — NEW: - Benchmark evaluate() across identifiers, predicates (string equality, numeric comparison, variable-vs-variable), compound AND/OR with short-circuit evaluation, negation, and realistic patterns (admin check, auth guard, item state check). State benchmarks (webui-state) — NEW: - Benchmark find_value_by_dotted_path across path depths (1-8 levels), value types (string/number/boolean/array/object clone cost), .length pseudo-property, missing-path early exit, large object (100 keys) lookup, and loop simulation (100-item batch lookups). Process management refactor (xtask): - Extract child-process lifecycle logic from dev.rs into a dedicated process.rs module with cross-platform support. - Add graceful shutdown via SIGTERM (Unix) and CTRL_BREAK_EVENT (Windows) with a timed fallback to a forced stop. - Spawn children in their own process groups for clean signalling. - Replace Printer struct with direct console::style() calls, aligning with upstream terminal styling changes from #63. Xtask bench command: - Add bench subcommand supporting parser, handler, protocol, expressions, state, and all targets. Dependencies: - Add criterion as a workspace dev-dependency for expressions and state. - Add libc as a unix-only dependency for xtask (process groups). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Contributor
|
How these benchmark run? do you need to update the documentation? |
Contributor
Author
Yes, sorry, updated! You can use |
radium-v
approved these changes
Mar 5, 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 realistic, real-world benchmark suites for all performance-critical crates in the workspace, modeled after actual WebUI template patterns from the example apps.
Parser benchmarks (webui-parser):
Handler benchmarks (webui-handler):
Protocol benchmarks (webui-protocol):
Expression benchmarks (webui-expressions) — NEW:
State benchmarks (webui-state) — NEW:
Process management refactor (xtask):
Xtask bench command:
Dependencies: