diff --git a/crates/bevy_ecs/src/schedule/parallel_executor.rs b/crates/bevy_ecs/src/schedule/parallel_executor.rs index 4f02207355..71faf4fd7d 100644 --- a/crates/bevy_ecs/src/schedule/parallel_executor.rs +++ b/crates/bevy_ecs/src/schedule/parallel_executor.rs @@ -377,7 +377,11 @@ impl ExecutorStage { { let mut system = system.lock(); log::trace!("run {}", system.name()); + #[cfg(feature = "profiler")] + crate::profiler_start(resources, system.name().clone()); system.run(world_ref, resources_ref); + #[cfg(feature = "profiler")] + crate::profiler_stop(resources, system.name().clone()); } // Notify dependents that this task is done