Skip to content

Commit 15dc0eb

Browse files
committed
Add a stress test profile (#6901)
# Objective This adds a custom profile for testing against stress tests. Bevy seemingly gets notably faster with LTO turned on. To more accurately depict production level performance, LTO and other rustc-level optimizations should be enabled when performance testing on stress tests. Also updated the stress test docs to reflect that users should be using it.
1 parent 904e4bc commit 15dc0eb

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

Cargo.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1608,3 +1608,8 @@ inherits = "release"
16081608
opt-level = "z"
16091609
lto = "fat"
16101610
codegen-units = 1
1611+
1612+
[profile.stress-test]
1613+
inherits = "release"
1614+
lto = "fat"
1615+
panic = "abort"

examples/stress_tests/README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,12 @@
11
# Stress tests
22

3-
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.
3+
These examples are used to stress test Bevy's performance in various ways. These
4+
should be run with the "stress-test" profile to accurately represent performance
5+
in production, otherwise they will run in cargo's default "dev" profile which is
6+
very slow.
7+
8+
## Example Command
9+
10+
```bash
11+
cargo run --profile stress-test --example <EXAMPLE>
12+
```

0 commit comments

Comments
 (0)