bench: move to dev-dependencies#1
Merged
ZR233 merged 3 commits intoarceos-hypervisor:mainfrom Mar 5, 2026
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Moves benchmark-only crates out of the main dependency graph by relocating criterion and rand to dev-dependencies, and updates docs/bench configuration so cargo bench no longer needs a bench feature.
Changes:
- Move
criterionandrandfrom optional[dependencies]to[dev-dependencies]and deprecate thebenchfeature (now a no-op). - Remove
required-features = ["bench"]from all[[bench]]targets so benchmarks run by default. - Update top-level README benchmark commands to drop
--features bench.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
Cargo.toml |
Shifts benchmark deps to dev-dependencies, deprecates bench feature, and makes benches runnable without feature gates. |
benches/README_CN.md |
Updates benchmark commands to stop requiring --features bench (but still has a couple leftover references to bench). |
README.md |
Updates benchmark command to cargo bench (but references a non-existent benches/README.md). |
README_CN.md |
Updates benchmark command to cargo bench. |
Comments suppressed due to low confidence (3)
benches/README_CN.md:17
- The prerequisites text above this command still says benchmarks require enabling the
benchfeature to pull incriterion/rand, but those dependencies are nowdev-dependenciesandcargo benchworks without--features bench. Please update the prerequisites section to match the new Cargo.toml behavior.
rustup install 1.93.0
# 使用指定版本运行 benchmark
cargo +1.93.0 bench
**README.md:163**
* `benches/README.md` is referenced here, but there is no `benches/README.md` file in the repository (only `benches/README_CN.md`). This link will mislead users; either add the English README under `benches/README.md` or update the reference to an existing document.
cargo bench
For detailed usage instructions, refer to `benches/README.md`.
benches/README_CN.md:59
- This section still implies benchmarks need the
benchfeature and also uses--features "bench tracking", butbenchis now deprecated/no-op and benchmarks should run without it. Update the wording and the command to use only--features tracking(and remove references to enablingbench).
# 启用 memory tracking 功能运行 benchmark
cargo +1.93.0 bench --features "bench tracking"
# 保存基线用于后续对比
cargo +1.93.0 bench -- --save-baseline main
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ZR233
approved these changes
Mar 5, 2026
Copilot AI
added a commit
that referenced
this pull request
Mar 5, 2026
Co-authored-by: AsakuraMizu <17076564+AsakuraMizu@users.noreply.github.com>
ZR233
added a commit
that referenced
this pull request
Mar 5, 2026
* Initial plan * chore: bump version to 0.2.0 Co-authored-by: ZR233 <34859362+ZR233@users.noreply.github.com> * chore: remove deprecated bench feature Co-authored-by: ZR233 <34859362+ZR233@users.noreply.github.com> * docs: complete CHANGELOG for 0.2.0 with entries from PRs #1 and #2 Co-authored-by: AsakuraMizu <17076564+AsakuraMizu@users.noreply.github.com> --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com> Co-authored-by: ZR233 <34859362+ZR233@users.noreply.github.com> Co-authored-by: AsakuraMizu <17076564+AsakuraMizu@users.noreply.github.com>
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.
Move
criterionandrandtodev-dependencies.Now the
benchfeature is useless and deprecated. Or we can remove it now.