bevy/crates/bevy_ecs/src/system/commands
James Liu 79b9231b74 Move system_commands spans into apply_buffers (#6900)
# Objective
A separate `tracing` span for running a system's commands is created, even if the system doesn't have commands. This is adding extra measuring overhead (see #4892) where it's not needed.

## Solution
Move the span into `ParallelCommandState` and `CommandQueue`'s `SystemParamState::apply`. To get the right metadata for the span, a additional `&SystemMeta` parameter was added to `SystemParamState::apply`.

---

## Changelog
Added: `SystemMeta::name`
Changed: Systems without `Commands` and  `ParallelCommands` will no longer show a "system_commands" span when profiling.
Changed: `SystemParamState::apply` now takes a `&SystemMeta` parameter in addition to the provided `&mut World`.
2022-12-11 23:04:04 +00:00
..
command_queue.rs Spawn now takes a Bundle (#6054) 2022-09-23 19:55:54 +00:00
mod.rs Remove APIs deprecated in 0.9 (#6801) 2022-12-05 22:49:04 +00:00
parallel_scope.rs Move system_commands spans into apply_buffers (#6900) 2022-12-11 23:04:04 +00:00