Skip to content

bench: move to dev-dependencies#1

Merged
ZR233 merged 3 commits intoarceos-hypervisor:mainfrom
AsakuraMizu:pr/bench
Mar 5, 2026
Merged

bench: move to dev-dependencies#1
ZR233 merged 3 commits intoarceos-hypervisor:mainfrom
AsakuraMizu:pr/bench

Conversation

@AsakuraMizu
Copy link
Copy Markdown
Contributor

Move criterion and rand to dev-dependencies.

Now the bench feature is useless and deprecated. Or we can remove it now.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 criterion and rand from optional [dependencies] to [dev-dependencies] and deprecate the bench feature (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 bench feature to pull in criterion/rand, but those dependencies are now dev-dependencies and cargo bench works 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 bench feature and also uses --features "bench tracking", but bench is 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 enabling bench).
# 启用 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 ZR233 merged commit cf0a059 into arceos-hypervisor:main Mar 5, 2026
8 checks passed
@AsakuraMizu AsakuraMizu deleted the pr/bench branch March 5, 2026 13:23
@ZR233 ZR233 mentioned this pull request 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>
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