pub struct PerfSnapshot {Show 17 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,
pub memory: Option<MemorySample>,
pub gc: GcSample,
}Expand description
What a PerfMonitor read, as of one moment.
Fields§
§fps: f32Frames 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: f32What 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: StatThe 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: StatThe gaps between shown frames over the last [CAPACITY] (long while
the app is idle, one period while it animates smoothly).
frame: StatMain-thread time per shown frame (applying batches, animations,
input), over the last [CAPACITY] frames.
dropped: f32Share of those frames that took longer than one refresh, in 0..=1.
commits: f32Commits per second over the last second.
js: StatThe app’s code per commit, over the commits of the last
[COMMIT_WINDOW] (none while the app made none).
layout: StatThe core’s work per commit, over the same commits.
items: f32Mean mount items per commit, over the same commits.
latency: StatHow long batches waited between the engine thread handing them over and the main thread applying them.
engine_busy: f32The 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: ProcessSampleThe process’ resource use, as last given to PerfMonitor::set_process.
memory: Option<MemorySample>What the app holds, as last given to PerfMonitor::set_memory:
none before the engine’s first idle collection.
gc: GcSampleThe engine’s idle collections over the last few seconds.
Implementations§
Source§impl PerfSnapshot
impl PerfSnapshot
Sourcepub fn stats(&self) -> PerfStats
pub fn stats(&self) -> PerfStats
What apps read of it (perfStats(), nsh_core::element::perf_stats).