feat: add profiling

This commit is contained in:
2025-08-15 13:15:56 -05:00
parent 02a98c9f32
commit 8c95ecc547
6 changed files with 59 additions and 21 deletions

View File

@@ -19,6 +19,7 @@ use crate::systems::{
control::player_system,
input::input_system,
movement::movement_system,
profiling::{profile, SystemTimings},
render::{directional_render_system, render_system, BackbufferResource, MapTextureResource},
};
use crate::texture::animated::AnimatedTexture;
@@ -171,6 +172,7 @@ impl Game {
world.insert_resource(map);
world.insert_resource(GlobalState { exit: false });
world.insert_resource(ScoreResource(0));
world.insert_resource(SystemTimings::default());
world.insert_resource(Bindings::default());
world.insert_resource(DeltaTime(0f32));
@@ -188,13 +190,13 @@ impl Game {
schedule.add_systems(
(
input_system,
player_system,
movement_system,
collision_system,
blinking_system,
directional_render_system,
render_system,
profile("input", input_system),
profile("player", player_system),
profile("movement", movement_system),
profile("collision", collision_system),
profile("blinking", blinking_system),
profile("directional_render", directional_render_system),
profile("render", render_system),
)
.chain(),
);