Skip to content

Commit

Permalink
add a span for frames (#2053)
Browse files Browse the repository at this point in the history
add a span for frames
  • Loading branch information
mockersf committed Apr 30, 2021
1 parent dbf519c commit 07e7728
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions crates/bevy_app/src/app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ impl App {
}

pub fn update(&mut self) {
#[cfg(feature = "trace")]
let bevy_frame_update_span = info_span!("frame");
#[cfg(feature = "trace")]
let _bevy_frame_update_guard = bevy_frame_update_span.enter();
self.schedule.run(&mut self.world);
}

Expand Down

0 comments on commit 07e7728

Please sign in to comment.