From 4122ded25f5afef2867dbff2377a2a8c677940d8 Mon Sep 17 00:00:00 2001 From: Doonv <58695417+doonv@users.noreply.github.com> Date: Wed, 24 Jan 2024 14:42:44 +0200 Subject: [PATCH 1/3] Add `README.md` to benches --- benches/README.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 benches/README.md diff --git a/benches/README.md b/benches/README.md new file mode 100644 index 0000000000000..a8b7f65ee839a --- /dev/null +++ b/benches/README.md @@ -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). +2. Move into the `benches` directory (where this README is located). + + ```sh + bevy $ cd benches + ``` + +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). From 67b420c1ecd68d90e37c425d2dc701fb9d6d115c Mon Sep 17 00:00:00 2001 From: Doonv <58695417+doonv@users.noreply.github.com> Date: Wed, 24 Jan 2024 17:38:48 +0200 Subject: [PATCH 2/3] A few suggested improvements --- benches/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/benches/README.md b/benches/README.md index a8b7f65ee839a..25de5855f73c8 100644 --- a/benches/README.md +++ b/benches/README.md @@ -4,7 +4,7 @@ This is a crate with a collection of benchmarks for Bevy, separate from the rest ## Running the benchmarks -1. If cargo isn't already installed, [install it](https://www.rust-lang.org/tools/install). +1. Setup everything you need for Bevy with the [setup guide](https://bevyengine.org/learn/book/getting-started/setup/). 2. Move into the `benches` directory (where this README is located). ```sh @@ -25,4 +25,4 @@ This is a crate with a collection of benchmarks for Bevy, separate from the rest ## 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). +Bevy's benchmarks use [Criterion](https://crates.io/crates/criterion) to chart and plot the performance of benchmarks. 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). From d4c8715efd9249cfdbec568ec3722731e8404763 Mon Sep 17 00:00:00 2001 From: Doonv <58695417+doonv@users.noreply.github.com> Date: Wed, 24 Jan 2024 18:36:51 +0200 Subject: [PATCH 3/3] Apply suggestions Co-authored-by: Rob Parrett --- benches/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benches/README.md b/benches/README.md index 25de5855f73c8..2641ab027aa72 100644 --- a/benches/README.md +++ b/benches/README.md @@ -25,4 +25,4 @@ This is a crate with a collection of benchmarks for Bevy, separate from the rest ## Criterion -Bevy's benchmarks use [Criterion](https://crates.io/crates/criterion) to chart and plot the performance of benchmarks. 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). +Bevy's benchmarks use [Criterion](https://crates.io/crates/criterion). If you want to learn more about using Criterion for comparing performance against a baseline or generating detailed reports, you can read the [Criterion.rs documentation](https://bheisler.github.io/criterion.rs/book/criterion_rs.html).