Skip to main content

PerfSnapshot

Struct PerfSnapshot 

Source
pub struct PerfSnapshot {
Show 15 fields pub fps: f32, pub max_fps: f32, pub refresh_rate: Option<f32>, pub tick_interval: Stat, pub frame_interval: Stat, pub frame: Stat, pub dropped: f32, pub commits: f32, pub js: Stat, pub layout: Stat, pub items: f32, pub latency: Stat, pub engine_busy: f32, pub frames: Vec<Duration>, pub process: ProcessSample,
}
Expand description

What a PerfMonitor read, as of one moment.

Fields§

§fps: f32

Frames shown per second over the last second: display refreshes in which the surface changed. Low while the app is idle, which is not slowness.

§max_fps: f32

What the main thread could keep up with: one over the mean frame cost, capped at the display’s rate when it is known.

§refresh_rate: Option<f32>

The rate the display link asks for (Hz: its period), once it ran.

§tick_interval: Stat

The gaps between refreshes as they were delivered, over the last [CAPACITY]: a mean above one period means refreshes came late or were skipped (a main thread busy when they were due).

§frame_interval: Stat

The gaps between shown frames over the last [CAPACITY] (long while the app is idle, one period while it animates smoothly).

§frame: Stat

Main-thread time per shown frame (applying batches, animations, input), over the last [CAPACITY] frames.

§dropped: f32

Share of those frames that took longer than one refresh, in 0..=1.

§commits: f32

Commits per second over the last second.

§js: Stat

The app’s code per commit.

§layout: Stat

The core’s work per commit.

§items: f32

Mean mount items per commit.

§latency: Stat

How long batches waited between the engine thread handing them over and the main thread applying them.

§engine_busy: f32

The engine thread’s busy time over the last second, in percent.

§frames: Vec<Duration>

Main-thread cost of the retained frames, oldest first (for a trace).

§process: ProcessSample

The process’ resource use, as last given to PerfMonitor::set_process.

Trait Implementations§

Source§

impl Clone for PerfSnapshot

Source§

fn clone(&self) -> Self

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 PerfSnapshot

Source§

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

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

impl Default for PerfSnapshot

Source§

fn default() -> Self

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

impl PartialEq for PerfSnapshot

Source§

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

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

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

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for PerfSnapshot

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> 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> ParallelSend for T

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
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, !>

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.