From 07e772814fd04432660bca6ca8ecd1848cdf0d75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois?= Date: Fri, 30 Apr 2021 02:08:49 +0000 Subject: [PATCH] add a span for frames (#2053) add a span for frames --- crates/bevy_app/src/app.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/bevy_app/src/app.rs b/crates/bevy_app/src/app.rs index c7b850cff7..d30303a4ac 100644 --- a/crates/bevy_app/src/app.rs +++ b/crates/bevy_app/src/app.rs @@ -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); }