From 52665be9cb11e35e2409354002df360379d69f94 Mon Sep 17 00:00:00 2001 From: IceSentry Date: Tue, 22 Mar 2022 10:35:19 -0400 Subject: [PATCH 1/4] reorder README and move bevymark to stress_tests category --- examples/README.md | 33 ++++++++++---------- examples/{tools => stress_tests}/bevymark.rs | 0 2 files changed, 17 insertions(+), 16 deletions(-) rename examples/{tools => stress_tests}/bevymark.rs (100%) diff --git a/examples/README.md b/examples/README.md index 5342f9d4d288c..b073808dd3230 100644 --- a/examples/README.md +++ b/examples/README.md @@ -50,6 +50,7 @@ git checkout v0.4.0 - [Reflection](#reflection) - [Scene](#scene) - [Shaders](#shaders) +- [Stress Tests](#stress-tests) - [Tests](#tests) - [Tools](#tools) - [Transforms](#transforms) @@ -66,7 +67,7 @@ git checkout v0.4.0 - [WASM](#wasm) - [Setup](#setup-2) - [Build & Run](#build--run-2) -- [Stress Tests](#stress-tests) + - [Loading Assets](#loading-assets) # The Bare Minimum @@ -238,6 +239,21 @@ Example | File | Description `compute_shader_game_of_life` | [`shader/compute_shader_game_of_life.rs`](./shader/compute_shader_game_of_life.rs) | A compute shader simulating Conway's Game of Life `shader_defs` | [`shader/shader_defs.rs`](./shader/shader_defs.rs) | Demonstrates creating a custom material that uses "shaders defs" (a tool to selectively toggle parts of a shader) +# Stress Tests + +These examples are used to test the performance and stability of various parts of the engine in an isolated way. + +Due to the focus on performance it's recommended to run the stress tests in release mode: + +```sh +cargo run --release --example +``` + +Example | File | Description +--- | --- | --- +`bevymark` | [`stress_tests/bevymark.rs`](./stress_tests/bevymark.rs) | A heavy sprite rendering workload to benchmark your system with Bevy +`transform_hierarchy.rs` | [`stress_tests/transform_hierarchy.rs`](./stress_tests/transform_hierarchy.rs) | Various test cases for hierarchy and transform propagation performance + ## Tests Example | File | Description @@ -248,7 +264,6 @@ Example | File | Description Example | File | Description --- | --- | --- -`bevymark` | [`tools/bevymark.rs`](./tools/bevymark.rs) | A heavy sprite rendering workload to benchmark your system with Bevy `scene_viewer` | [`tools/scene_viewer.rs`](./tools/scene_viewer.rs) | A simple way to view glTF models with Bevy. Just run `cargo run --release --example scene_viewer -- /path/to/model.gltf#Scene0`, replacing the path as appropriate. With no arguments it will load the FieldHelmet glTF model from the repository assets subdirectory. ## Transforms @@ -422,17 +437,3 @@ ruby -run -ehttpd examples/wasm To load assets, they need to be available in the folder examples/wasm/assets. Cloning this repository will set it up as a symlink on Linux and macOS, but you will need to manually move the assets on Windows. - -# Stress Tests - -These examples are used to test the performance and stability of various parts of the engine in an isolated way. - -Due to the focus on performance it's recommended to run the stress tests in release mode: - -```sh -cargo run --release --example -``` - -Example | File | Description ---- | --- | --- -`transform_hierarchy.rs` | [`stress_tests/transform_hierarchy.rs`](./stress_tests/transform_hierarchy.rs) | Various test cases for hierarchy and transform propagation performance diff --git a/examples/tools/bevymark.rs b/examples/stress_tests/bevymark.rs similarity index 100% rename from examples/tools/bevymark.rs rename to examples/stress_tests/bevymark.rs From 0c3530e44bcaf776d233752502e2e45f0195eada Mon Sep 17 00:00:00 2001 From: IceSentry Date: Tue, 22 Mar 2022 10:38:51 -0400 Subject: [PATCH 2/4] fix header level --- examples/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/README.md b/examples/README.md index b073808dd3230..53652d70910c2 100644 --- a/examples/README.md +++ b/examples/README.md @@ -50,7 +50,7 @@ git checkout v0.4.0 - [Reflection](#reflection) - [Scene](#scene) - [Shaders](#shaders) -- [Stress Tests](#stress-tests) + - [Stress Tests](#stress-tests) - [Tests](#tests) - [Tools](#tools) - [Transforms](#transforms) @@ -239,7 +239,7 @@ Example | File | Description `compute_shader_game_of_life` | [`shader/compute_shader_game_of_life.rs`](./shader/compute_shader_game_of_life.rs) | A compute shader simulating Conway's Game of Life `shader_defs` | [`shader/shader_defs.rs`](./shader/shader_defs.rs) | Demonstrates creating a custom material that uses "shaders defs" (a tool to selectively toggle parts of a shader) -# Stress Tests +## Stress Tests These examples are used to test the performance and stability of various parts of the engine in an isolated way. From eb1914651ed3cff94bdd836a6943514fab439b79 Mon Sep 17 00:00:00 2001 From: IceSentry Date: Tue, 22 Mar 2022 10:42:04 -0400 Subject: [PATCH 3/4] fix cargo.toml --- Cargo.toml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 6577c9317ea95..e5c214165a23c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -507,10 +507,6 @@ name = "compute_shader_game_of_life" path = "examples/shader/compute_shader_game_of_life.rs" # Tools -[[example]] -name = "bevymark" -path = "examples/tools/bevymark.rs" - [[example]] name = "scene_viewer" path = "examples/tools/scene_viewer.rs" @@ -601,4 +597,3 @@ target_sdk_version = 29 [[example]] name = "transform_hierarchy" path = "examples/stress_tests/transform_hierarchy.rs" - From 10cc3e24db2becc973024193fb60e6fedc8276d0 Mon Sep 17 00:00:00 2001 From: IceSentry Date: Tue, 22 Mar 2022 10:48:56 -0400 Subject: [PATCH 4/4] fix cargo.toml --- Cargo.toml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e5c214165a23c..e6cc4ed91ae90 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -506,6 +506,15 @@ path = "examples/shader/animate_shader.rs" name = "compute_shader_game_of_life" path = "examples/shader/compute_shader_game_of_life.rs" +# Stress Tests +[[example]] +name = "transform_hierarchy" +path = "examples/stress_tests/transform_hierarchy.rs" + +[[example]] +name = "bevymark" +path = "examples/stress_tests/bevymark.rs" + # Tools [[example]] name = "scene_viewer" @@ -592,8 +601,3 @@ icon = "@mipmap/ic_launcher" build_targets = ["aarch64-linux-android", "armv7-linux-androideabi"] min_sdk_version = 16 target_sdk_version = 29 - -# Stress Tests -[[example]] -name = "transform_hierarchy" -path = "examples/stress_tests/transform_hierarchy.rs"