Skip to content

test: split benchmark case entrypoints#13971

Merged
hardfist merged 2 commits into
mainfrom
codex/split-benchmark-cases
May 9, 2026
Merged

test: split benchmark case entrypoints#13971
hardfist merged 2 commits into
mainfrom
codex/split-benchmark-cases

Conversation

@hardfist

@hardfist hardfist commented May 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Split non-stage benchmark registration into per-case entrypoint files under xtask/benchmark/cases.
  • Keep benchmark implementations in xtask/benchmark/benches/groups while shortening CodSpeed callgrind profile-part paths for KCachegrind readability.
  • Cover build graph, module graph API, scan dependencies, bundle variants, and persistent cache cases.

Related links

Follow-up to #13969.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).

@hardfist hardfist marked this pull request as ready for review May 9, 2026 08:03
Copilot AI review requested due to automatic review settings May 9, 2026 08:03
@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Rsdoctor Bundle Diff Analysis

Found 6 projects in monorepo, 0 projects with changes.

📊 Quick Summary
Project Total Size Change
popular-libs 1.7 MB 0
react-10k 5.7 MB 0
react-1k 826.3 KB 0
rome 1.6 MB 0
ui-components 4.8 MB 0
react-5k 2.7 MB 0

Generated by Rsdoctor GitHub Action

@github-actions

github-actions Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

📦 Binary Size-limit

Comparing 1096b77 to test: split compilation stage benchmarks (#13969) by hardfist

🙈 Size remains the same at 61.92MB

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

Splits benchmark registration into per-case entrypoint modules under xtask/benchmark/cases to keep benchmark implementations in xtask/benchmark/benches/groups while producing shorter CodSpeed callgrind profile-part source paths for KCachegrind readability.

Changes:

  • Adds per-benchmark “case” entrypoint modules in xtask/benchmark/cases/* and wires them into criterion_main!.
  • Removes criterion_group! registrations from benches/groups/* and keeps only benchmark implementation functions there.
  • Refactors persistent-cache benchmarks to share setup/teardown via a common helper.

Reviewed changes

Copilot reviewed 17 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
xtask/benchmark/cases/*.rs New per-case Criterion entrypoints (each exports a case group).
xtask/benchmark/cases/mod.rs Exposes all case modules for registration from benches.rs.
xtask/benchmark/benches/benches.rs Registers individual case entrypoints to get shorter profile-part paths.
xtask/benchmark/benches/groups/bundle.rs Switches from registering all bundle benches at once to a per-target case entrypoint.
xtask/benchmark/benches/groups/persistent_cache.rs Extracts shared persistent-cache benchmarking logic into a helper.
xtask/benchmark/benches/groups/{scan_dependencies,module_graph_api,build_chunk_graph}.rs Removes group-registration macros; retains benchmark implementations.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread xtask/benchmark/benches/groups/persistent_cache.rs Outdated
Comment thread xtask/benchmark/benches/groups/persistent_cache.rs Outdated
Comment thread xtask/benchmark/cases/bundle_basic_react_development.rs Outdated
@codspeed-hq

codspeed-hq Bot commented May 9, 2026

Copy link
Copy Markdown
Contributor

Merging this PR will not alter performance

✅ 24 untouched benchmarks
🆕 10 new benchmarks
⏩ 25 skipped benchmarks1

Performance Changes

Mode Benchmark BASE HEAD Efficiency
🆕 Simulation rust@build_module_graph N/A 937.3 ms N/A
🆕 Simulation bundle@basic-react-development N/A 324.6 ms N/A
🆕 Simulation bundle@basic-react-production-sourcemap N/A 277.2 ms N/A
🆕 Simulation bundle@threejs-development N/A 270.2 ms N/A
🆕 Simulation bundle@threejs-production-sourcemap N/A 400.2 ms N/A
🆕 Simulation rust@module_graph_api N/A 11.7 ms N/A
🆕 Simulation rust@persistent_cache_restore@basic-react-development N/A 15.8 ms N/A
🆕 Simulation rust@build_chunk_graph N/A 80.6 ms N/A
🆕 Simulation rust@persistent_cache_restore_after_single_file_change@basic-react-development N/A 16.6 ms N/A
🆕 Simulation rust@scan_dependencies@three_module N/A 21.1 ms N/A

Comparing codex/split-benchmark-cases (1096b77) with main (34c3ecd)

Open in CodSpeed

Footnotes

  1. 25 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@hardfist hardfist enabled auto-merge (squash) May 9, 2026 09:07
@hardfist hardfist merged commit 81aa0bb into main May 9, 2026
34 checks passed
@hardfist hardfist deleted the codex/split-benchmark-cases branch May 9, 2026 09:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants