-
-
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
Enhance bevymark #9674
Enhance bevymark #9674
Conversation
f80b966
to
e2aa8a3
Compare
7d6cb3d
to
96f5926
Compare
When spawning the text I'd suggest using this instead: commands
.spawn(NodeBundle {
style: Style {
position_type: PositionType::Absolute,
padding: UiRect::all(Val::Px(5.0)),
..default()
},
z_index: ZIndex::Global(i32::MAX),
background_color: Color::BLACK.with_a(0.75).into(),
..default()
})
.with_children(|c| {
c.spawn((
TextBundle::from_sections([
text_section(Color::GREEN, "Bird Count"),
text_section(Color::CYAN, ""),
text_section(Color::GREEN, "\nFPS (raw): "),
text_section(Color::CYAN, ""),
text_section(Color::GREEN, "\nFPS (SMA): "),
text_section(Color::CYAN, ""),
text_section(Color::GREEN, "\nFPS (EMA): "),
text_section(Color::CYAN, ""),
]),
StatsText,
));
}); It will add a dark background to the text and makes it much easier to read Your PR didn't touch that part so I can't add it as a code suggestion in my review. |
- Use `argh` for command line interface options - Use seeded StdRng for reproducible random number generation - Add a mode for testing 2D meshes that includes an option to uniquely vary the data of each material by setting a random flat colour on the ColorMaterial. - Add a way of specifying the number of different textures to use for sprites or meshes. These are generated at the same resolution as the Bevy bird icon, but are just random flat colours for testing. - Add a benchmark mode that spawns all entities during setup, and animates the entities using a fixed delta time for reproducible animation. The initially-spawned entities are still spawned in waves and animated as they would have been had they spawned at intervals.
96f5926
to
c7c7acf
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.
I'm not sure I get why using --benchmark
spawns all waves at once instead of on a timer. Seems to me it could be useful to detect spawning overhead if we don't spawn everything at once? Maybe it could be a separate flag?
Other than that LGTM
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.
Seems sensible enough :) IceSentry's comments are good, but I'll leave it to you how much you want to do here.
The reason to spawn everything up-front is to immediately get to the heavy rendering load. bevymark is in my opinion a 2D rendering stress test and not an ECS spawning stress test. So I think it’s useful to capture more profile data at max load. |
# Objective - In preparation for an initial 2D/3D mesh batching/instancing PR, enhance `bevymark` to support some different test modes that enable comparison and optimisation of performance ## Solution - Use `argh` for command line interface options - Use seeded `StdRng` for reproducible random number generation - Add a mode for testing 2D meshes that includes an option to uniquely vary the data of each material by setting a random flat colour on the `ColorMaterial`. - Add a way of specifying the number of different textures to use for sprites or meshes. These are generated at the same resolution as the Bevy bird icon, but are just random flat colours for testing. - Add a benchmark mode that spawns all entities during setup, and animates the entities using a fixed delta time for reproducible animation. The initially-spawned entities are still spawned in waves and animated as they would have been had they spawned at intervals. --------- Co-authored-by: IceSentry <IceSentry@users.noreply.github.com>
Objective
bevymark
to support some different test modes that enable comparison and optimisation of performanceSolution
argh
for command line interface optionsStdRng
for reproducible random number generationColorMaterial
.