Struct FrameTiming
pub struct FrameTiming {Show 20 fields
pub frame: u64,
pub t_us: u64,
pub sync_us: u64,
pub build_layout_us: u64,
pub apply_layout_us: u64,
pub draw_us: u64,
pub draw_commands: u64,
pub handle_event_us: u64,
pub resource_availability_us: u64,
pub scene_pool_wait_us: u64,
pub presence_overlay_us: u64,
pub input_events: u64,
pub input_event_max_us: u64,
pub input_dispatch_us: u64,
pub input_hit_test_us: u64,
pub input_resources_us: u64,
pub input_publication_us: u64,
pub input_commit_us: u64,
pub input_to_commit_us: u64,
pub total_us: u64,
}Expand description
This is the atom every surface shares: the HUD graphs it, the dump
serialises it, and PerfReport aggregates it.
Fields§
§frame: u64§t_us: u64A monotonic counter, not a wall clock, so it is immune to clock steps.
sync_us: u64§build_layout_us: u64§apply_layout_us: u64§draw_us: u64§draw_commands: u64The draw commands the frame’s drawn scene encoded: the drawing it composed, whether a frame reuses what it kept or draws it again.
handle_event_us: u64§resource_availability_us: u64§scene_pool_wait_us: u64§presence_overlay_us: u64§input_events: u64Input events whose handle_event time is folded into this frame.
Several events share a frame, so handle_event_us is their sum, not
any one event’s cost.
input_event_max_us: u64The costliest single event among input_events.
input_dispatch_us: u64InputPhases::dispatch, summed over input_events.
input_hit_test_us: u64InputPhases::hit_test, summed over input_events.
input_resources_us: u64InputPhases::resources, summed over input_events.
input_publication_us: u64InputPhases::publication, summed over input_events.
input_commit_us: u64InputPhases::commit, summed over input_events.
input_to_commit_us: u64From the start of the oldest of input_events to this frame’s
commit: how long the first input waited for a CPU frame showing it.
Ends before the render worker, so it is not input-to-photon latency.
total_us: u64For the live app this is the measured wall time of the whole frame build (so it includes work between passes); for the headless harness, where passes run contiguously, it is their sum.
Implementations§
§impl FrameTiming
impl FrameTiming
pub fn over_budget(&self) -> bool
Trait Implementations§
§impl Clone for FrameTiming
impl Clone for FrameTiming
§fn clone(&self) -> FrameTiming
fn clone(&self) -> FrameTiming
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more§impl Debug for FrameTiming
impl Debug for FrameTiming
§impl Default for FrameTiming
impl Default for FrameTiming
§fn default() -> FrameTiming
fn default() -> FrameTiming
§impl Serialize for FrameTiming
impl Serialize for FrameTiming
§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
impl Copy for FrameTiming
Auto Trait Implementations§
impl Freeze for FrameTiming
impl RefUnwindSafe for FrameTiming
impl Send for FrameTiming
impl Sync for FrameTiming
impl Unpin for FrameTiming
impl UnsafeUnpin for FrameTiming
impl UnwindSafe for FrameTiming
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSend for T
impl<T> DowncastSend for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> DowncastSync for T
impl<T> DowncastSync for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more