#[non_exhaustive]pub struct Stats {
pub frame_rate: f32,
pub frame_time: Duration,
pub tick_time: Duration,
pub ticks: u32,
pub draw_calls: u32,
pub sprites: u32,
pub entities: usize,
pub allocations: u64,
pub allocated_bytes: u64,
pub voices: u32,
pub underruns: u64,
}Expand description
What the stats overlay shows: plain numbers, which the engine copies in each frame from its own resources.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.frame_rate: f32Frames a second, averaged over the last frames.
frame_time: DurationHow long the processor worked on the last frame.
tick_time: DurationHow long the frame’s ticks took, together.
ticks: u32How many ticks the frame ran.
draw_calls: u32The draw calls of the last frame drawn.
sprites: u32The world’s sprites it drew.
entities: usizeThe entities alive.
allocations: u64The heap allocations of the last frame, on the main thread.
allocated_bytes: u64The bytes those allocations asked for.
voices: u32The voices sounding.
underruns: u64The audio device’s underruns so far.
Implementations§
Trait Implementations§
impl Copy for Stats
impl StructuralPartialEq for Stats
Auto Trait Implementations§
impl Forget for Stats
impl Freeze for Stats
impl Move for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin for Stats
impl UnsafeUnpin for Stats
impl UnwindSafe for Stats
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
Mutably borrows from an owned value. Read more