Skip to main content

FrameMetrics

Struct FrameMetrics 

Source
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: f64

Style plus layout, i.e. the resolve pass.

§scene_ms: f64

Scene 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: f64

Everything the renderer did outside scene building: encode, submit and present.

§total_ms: f64

resolve_ms + scene_ms + renderer_ms. CPU time inside redraw, not input-to-photon latency.

§age_ms: f64

How 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

Source§

fn clone(&self) -> FrameMetrics

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for FrameMetrics

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FrameMetrics

Source§

fn default() -> FrameMetrics

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for FrameMetrics

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl PartialEq for FrameMetrics

Source§

fn eq(&self, other: &FrameMetrics) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl Serialize for FrameMetrics

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
Source§

impl StructuralPartialEq for FrameMetrics

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.