diff --git a/Cargo.toml b/Cargo.toml index aa2eb4571a..c0e8fde052 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1608,3 +1608,8 @@ inherits = "release" opt-level = "z" lto = "fat" codegen-units = 1 + +[profile.stress-test] +inherits = "release" +lto = "fat" +panic = "abort" diff --git a/examples/stress_tests/README.md b/examples/stress_tests/README.md index 7bfef204a4..b64c46f1a0 100644 --- a/examples/stress_tests/README.md +++ b/examples/stress_tests/README.md @@ -1,3 +1,12 @@ # Stress tests -These examples are used to stress test Bevy's performance in various ways. These should be run with the --release argument to cargo or equivalent optimization, otherwise they will be very slow. +These examples are used to stress test Bevy's performance in various ways. These +should be run with the "stress-test" profile to accurately represent performance +in production, otherwise they will run in cargo's default "dev" profile which is +very slow. + +## Example Command + +```bash +cargo run --profile stress-test --example +```