-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Merged by Bors] - Add transform hierarchy stress test #4170
Conversation
102ba9d
to
a643441
Compare
Personally I would like to have a home for these kinds of test examples that are useful for development. |
Seconding this: @CptPotato can you start a "stress_tests" folder in "examples" for this to live in? We can move the related benchmarky-examples into there in a follow-up PR. @james7132 @superdump ping me when you think this is ready; I can merge this in for you to help unblock more experiments. |
A few requests from me:
This should let us test this at varying conditions typically expected out of a game scene (mostly static? mostly moving? how deep are the mutations?) |
Good points @james7132. I think I'll also change the code to be more "functional" rather than trying to make it look nice. I have some ideas for how to address these things. Tough, it might take me a couple of days to get to it. |
create example folder for stress tests
a643441
to
f86556f
Compare
Alright, I created the I have mostly rewritten the example, ditching the focus on visuals and taking some feedback into account, there's some more info in the PR description. The branch name doesn't really fit anymore but I guess that's okay? I'm still not too sure about the configuration part. I tried making it as versatile as reasonably possible but it seems a little bloated to me. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One typo, and please fix the CI, but otherwise amazing. This is exactly the kind of tests we needed.
Good to hear this is on the right track. Should we include a number of preset configurations for easier and more consistent testing? cargo r --example transform_hierarchy -- 1
cargo r --example transform_hierarchy -- 2
... |
If we do that, it would be good if they had memorable and descriptive names. 🙂 Like max-depth (a single long chain of hierarchy for worst case), max-width (like the many_cubes — sphere case of 160k root entities with transforms), varied-depth (perhaps specifying a depth range and the branches have paths that are various lengths within that depth range to try to simulate something reasonably realistic)? |
+ ci fixes
a96974b
to
615457f
Compare
Sorry for the delay. I added a few test cases that can be run like this: cargo r --example transform_hierarchy -- <name> These are the setups I came up with:
I shot for ~250k to 350k entities for each of those, I think this should provide a heavy enough load. Edit: I'm thinking about removing the last two configurations (the drawing ones) and removing the related code from the example, unless somebody needs those. Rendering performance seem a little outside of what the stress test is meant for, and it might be a better fit for a separate rendering/batching stress test. |
I agree with this. |
d364787
to
0499074
Compare
Alright, the drawing related code is gone, I also switched to I'm fairly happy with this as it is. Let me know if I should add/change anything! |
0499074
to
8ae7e5e
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me! I'm quite happy with this code, and it should be very useful for development.
Once I have another approval I'm happy to merge this in, and then I'd like to reshuffle the other stress tests into this folder.
bors r+ |
## Objective There recently was a discussion on Discord about a possible test case for stress-testing transform hierarchies. ## Solution Create a test case for stress testing transform propagation. *Edit:* I have scrapped my previous example and built something more functional and less focused on visuals. There are three test setups: - `TestCase::Tree` recursively creates a tree with a specified depth and branch width - `TestCase::NonUniformTree` is the same as `Tree` but omits nodes in a way that makes the tree "lean" towards one side, like this: <details> <summary></summary> ![image](https://user-images.githubusercontent.com/3957610/158069737-2ddf4e4a-7d5c-4ee5-8566-424a54a06723.png) </details> - `TestCase::Humanoids` creates one or more separate hierarchies based on the structure of common humanoid rigs - this can both insert `active` and `inactive` instances of the human rig It's possible to parameterize which parts of the hierarchy get updated (transform change) and which remain unchanged. This is based on @james7132 suggestion: There's a probability to decide which entities should remain static. On top of that these changes can be limited to a certain range in the hierarchy (min_depth..max_depth).
## Objective There recently was a discussion on Discord about a possible test case for stress-testing transform hierarchies. ## Solution Create a test case for stress testing transform propagation. *Edit:* I have scrapped my previous example and built something more functional and less focused on visuals. There are three test setups: - `TestCase::Tree` recursively creates a tree with a specified depth and branch width - `TestCase::NonUniformTree` is the same as `Tree` but omits nodes in a way that makes the tree "lean" towards one side, like this: <details> <summary></summary> ![image](https://user-images.githubusercontent.com/3957610/158069737-2ddf4e4a-7d5c-4ee5-8566-424a54a06723.png) </details> - `TestCase::Humanoids` creates one or more separate hierarchies based on the structure of common humanoid rigs - this can both insert `active` and `inactive` instances of the human rig It's possible to parameterize which parts of the hierarchy get updated (transform change) and which remain unchanged. This is based on @james7132 suggestion: There's a probability to decide which entities should remain static. On top of that these changes can be limited to a certain range in the hierarchy (min_depth..max_depth).
## Objective There recently was a discussion on Discord about a possible test case for stress-testing transform hierarchies. ## Solution Create a test case for stress testing transform propagation. *Edit:* I have scrapped my previous example and built something more functional and less focused on visuals. There are three test setups: - `TestCase::Tree` recursively creates a tree with a specified depth and branch width - `TestCase::NonUniformTree` is the same as `Tree` but omits nodes in a way that makes the tree "lean" towards one side, like this: <details> <summary></summary> ![image](https://user-images.githubusercontent.com/3957610/158069737-2ddf4e4a-7d5c-4ee5-8566-424a54a06723.png) </details> - `TestCase::Humanoids` creates one or more separate hierarchies based on the structure of common humanoid rigs - this can both insert `active` and `inactive` instances of the human rig It's possible to parameterize which parts of the hierarchy get updated (transform change) and which remain unchanged. This is based on @james7132 suggestion: There's a probability to decide which entities should remain static. On top of that these changes can be limited to a certain range in the hierarchy (min_depth..max_depth).
Objective
There recently was a discussion on Discord about a possible test case for stress-testing transform hierarchies.
Solution
Create a test case for stress testing transform propagation.
Edit: I have scrapped my previous example and built something more functional and less focused on visuals.
There are three test setups:
TestCase::Tree
recursively creates a tree with a specified depth and branch widthTestCase::NonUniformTree
is the same asTree
but omits nodes in a way that makes the tree "lean" towards one side, like this:TestCase::Humanoids
creates one or more separate hierarchies based on the structure of common humanoid rigsactive
andinactive
instances of the human rigIt's possible to parameterize which parts of the hierarchy get updated (transform change) and which remain unchanged. This is based on @james7132 suggestion:
There's a probability to decide which entities should remain static. On top of that these changes can be limited to a certain range in the hierarchy (min_depth..max_depth).