bevy/benches
Oliver Maskery a7ae0807ac
Fix panic in benches caused by missing resources (#16956)
# Objective

- To fix the benches panicking on `main`

## Solution

- It appears that systems requiring access to a non-existing `Res` now
causes a panic
- Some of the benches run systems that access resources that have not
been inserted into the world
- I have made it so that those resources are inserted into the world

## Testing

- I ran all the ecs benches and they all run without panicking

Co-authored-by: Oliver Maskery <oliver@wellplayed.games>
2024-12-24 17:18:03 +00:00
..
benches Fix panic in benches caused by missing resources (#16956) 2024-12-24 17:18:03 +00:00
Cargo.toml Add benchmarks and compile_fail tests back to workspace (#16858) 2024-12-21 22:30:29 +00:00
README.md Add benchmarks and compile_fail tests back to workspace (#16858) 2024-12-21 22:30:29 +00:00

Bevy Benchmarks

This is a crate with a collection of benchmarks for Bevy.

Running benchmarks

Benchmarks can be run through Cargo:

# Run all benchmarks. (This will take a while!)
cargo bench -p benches

# Just compile the benchmarks, do not run them.
cargo bench -p benches --no-run

# Run the benchmarks for a specific crate. (See `Cargo.toml` for a complete list of crates
# tracked.)
cargo bench -p benches --bench ecs

# Filter which benchmarks are run based on the name. This will only run benchmarks whose name
# contains "name_fragment".
cargo bench -p benches -- name_fragment

# List all available benchmarks.
cargo bench -p benches -- --list

# Save a baseline to be compared against later.
cargo bench -p benches --save-baseline before

# Compare the current benchmarks against a baseline to find performance gains and regressions.
cargo bench -p benches --baseline before

Criterion

Bevy's benchmarks use 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.