test: split compilation stage benchmarks#13969
Conversation
Merging this PR will not alter performance
Performance Changes
Comparing Footnotes
|
📦 Binary Size-limit
🙈 Size remains the same at 61.92MB |
Rsdoctor Bundle Diff AnalysisFound 6 projects in monorepo, 0 projects with changes. 📊 Quick Summary
Generated by Rsdoctor GitHub Action |
There was a problem hiding this comment.
Pull request overview
This PR restructures the benchmark registration for compilation stages by moving each stage’s Criterion registration into its own short-path entrypoint module under xtask/benchmark/stages, while keeping the heavy benchmark implementations in xtask/benchmark/benches/groups/compilation_stages.rs. This primarily targets shorter file!() paths embedded in CodSpeed callgrind profile-part names for improved KCachegrind readability.
Changes:
- Added per-stage benchmark entrypoint modules under
xtask/benchmark/stages/*and a sharedstages::runhelper to set up compiler context + Tokio runtime. - Refactored
compilation_stages.rsto expose per-stage benchmark functions (pub(crate)) and removed the monolithiccompilation_stagesCriterion group. - Updated the main bench registration (
benches.rs) to register each stage group individually via the newstages::*::stageentrypoints.
Reviewed changes
Copilot reviewed 18 out of 18 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| xtask/benchmark/stages/mod.rs | Adds shared run helper (compiler context + Tokio runtime) and declares per-stage modules. |
| xtask/benchmark/stages/flag_dependency_exports.rs | Registers the flag-dependency-exports stage as its own Criterion group. |
| xtask/benchmark/stages/flag_dependency_usage.rs | Registers the flag-dependency-usage stage as its own Criterion group. |
| xtask/benchmark/stages/create_module_ids.rs | Registers the create-module-ids stage as its own Criterion group. |
| xtask/benchmark/stages/split_chunks.rs | Registers the split-chunks stage as its own Criterion group. |
| xtask/benchmark/stages/create_chunk_ids.rs | Registers the create-chunk-ids stage as its own Criterion group. |
| xtask/benchmark/stages/mangle_exports.rs | Registers the mangle-exports stage as its own Criterion group. |
| xtask/benchmark/stages/create_module_hashes.rs | Registers the create-module-hashes stage as its own Criterion group. |
| xtask/benchmark/stages/runtime_requirements.rs | Registers the runtime-requirements stage as its own Criterion group. |
| xtask/benchmark/stages/create_chunk_hashes.rs | Registers the create-chunk-hashes stage as its own Criterion group. |
| xtask/benchmark/stages/create_full_hash.rs | Registers the create-full-hash stage as its own Criterion group. |
| xtask/benchmark/stages/create_module_assets.rs | Registers the create-module-assets stage as its own Criterion group. |
| xtask/benchmark/stages/create_chunk_assets.rs | Registers the create-chunk-assets stage as its own Criterion group. |
| xtask/benchmark/stages/real_content_hash.rs | Registers the real-content-hash stage as its own Criterion group. |
| xtask/benchmark/stages/create_concatenate_module.rs | Registers the create-concatenate-module stage as its own Criterion group. |
| xtask/benchmark/stages/concatenate_module_code_generation.rs | Registers the concatenate-module-code-generation stage as its own Criterion group. |
| xtask/benchmark/benches/groups/compilation_stages.rs | Removes the single “compilation_stages” group wrapper and exposes per-stage benchmark fns for reuse by the new entrypoints. |
| xtask/benchmark/benches/benches.rs | Switches Criterion registration to import stages via a short #[path=...] and registers each stage group explicitly. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
xtask/benchmark/stages.compilation_stages.rswhile shortening CodSpeed callgrind profile-part paths for KCachegrind readability.Related links
N/A
Checklist