pub struct FrameMetrics {
pub input_to_present_ms: Option<f64>,
pub style_ms: Option<f64>,
pub layout_ms: Option<f64>,
pub resolve_ms: f64,
pub scene_ms: f64,
pub submit_ms: Option<f64>,
pub present_ms: Option<f64>,
pub renderer_ms: f64,
pub total_ms: f64,
pub age_ms: f64,
}Expand description
Timings of one real presented frame, in milliseconds.
Every Option here is a value blitz does not measure. They are left empty on
purpose: a plausible-looking zero is worse than an admitted gap, because it
makes a missing measurement look like a fast one.
Fields§
§input_to_present_ms: Option<f64>Wall time from the input event that caused the frame to the frame reaching the screen. Blitz does not stamp input events with an arrival time and the renderer reports no present timestamp, so there are no two clocks to subtract.
style_ms: Option<f64>Style recalculation alone. Blitz runs style and layout inside a single
resolve pass and times only the pass, so the combined cost is in
resolve_ms instead.
layout_ms: Option<f64>Layout alone. See style_ms.
resolve_ms: f64Style plus layout, i.e. the resolve pass.
scene_ms: f64Scene building: the paint_scene call that turns the resolved document
into renderer commands.
submit_ms: Option<f64>GPU submit alone. The renderer reports encode, submit and present as one
figure, which is in renderer_ms.
present_ms: Option<f64>Present alone. See submit_ms.
renderer_ms: f64Everything the renderer did outside scene building: encode, submit and present.
total_ms: f64resolve_ms + scene_ms + renderer_ms. CPU time inside redraw, not
input-to-photon latency.
age_ms: f64How long ago the frame started, measured when this response was built. A large value means the app has been idle and these numbers are stale.
Trait Implementations§
Source§impl Clone for FrameMetrics
impl Clone for FrameMetrics
Source§impl Debug for FrameMetrics
impl Debug for FrameMetrics
Source§impl Default for FrameMetrics
impl Default for FrameMetrics
Source§impl<'de> Deserialize<'de> for FrameMetrics
impl<'de> Deserialize<'de> for FrameMetrics
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl JsonSchema for FrameMetrics
impl JsonSchema for FrameMetrics
Source§fn schema_id() -> Cow<'static, str>
fn schema_id() -> Cow<'static, str>
Source§fn json_schema(generator: &mut SchemaGenerator) -> Schema
fn json_schema(generator: &mut SchemaGenerator) -> Schema
Source§fn inline_schema() -> bool
fn inline_schema() -> bool
$ref keyword. Read moreSource§impl PartialEq for FrameMetrics
impl PartialEq for FrameMetrics
Source§impl Serialize for FrameMetrics
impl Serialize for FrameMetrics
impl StructuralPartialEq for FrameMetrics
Auto Trait Implementations§
impl Forget for FrameMetrics
impl Freeze for FrameMetrics
impl Move for FrameMetrics
impl RefUnwindSafe for FrameMetrics
impl Send for FrameMetrics
impl Sync for FrameMetrics
impl Unpin for FrameMetrics
impl UnsafeUnpin for FrameMetrics
impl UnwindSafe for FrameMetrics
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
impl<T> Brush for T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§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.Source§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.Source§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.Source§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.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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