Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add README to benches #11508

Merged
merged 3 commits into from
Jan 24, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions benches/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Bevy Benchmarks

This is a crate with a collection of benchmarks for Bevy, separate from the rest of the Bevy crates.

## Running the benchmarks

1. If cargo isn't already installed, [install it](https://www.rust-lang.org/tools/install).
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we really need to walk users through installing cargo here? If they don't have cargo, then they likely also don't have other required dependencies.

Maybe just mention that bevy has some dependencies and link off to https://bevyengine.org/learn/book/getting-started/setup/ or something?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I changed the wording and made it link to the website.

2. Move into the `benches` directory (where this README is located).

```sh
bevy $ cd benches
alice-i-cecile marked this conversation as resolved.
Show resolved Hide resolved
```

3. Run the benchmarks with cargo (This will take a while)

```sh
bevy/benches $ cargo bench
```

If you'd like to only compile the benchmarks (without running them), you can do that like this:

```sh
bevy/benches $ cargo bench --no-run
```

## Criterion

Bevy's benchmarks use [Criterion](https://crates.io/crates/criterion) to chart and track benchmarks over time. If you want to learn more about using Criterion for benchmarking, you can read the [Criterion.rs documentation](https://bheisler.github.io/criterion.rs/book/criterion_rs.html).
Copy link
Contributor

Choose a reason for hiding this comment

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

"benchmarks use criterion to chart and track benchmarks over time" feels a bit misleading.

Individual developers can generate charts and/or compare a particular set of changes against a baseline.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Changed the wording a bit.