pub struct StatsCollector { /* private fields */ }Expand description
Keeps a rolling window of per-frame stats for profiling.
Implementations§
Source§impl StatsCollector
impl StatsCollector
pub fn new(max_history: usize) -> Self
pub fn push(&mut self, stats: RenderStats)
pub fn average_draw_calls(&self) -> f32
pub fn average_triangles(&self) -> f32
pub fn total_frames(&self) -> usize
pub fn clear(&mut self)
Auto Trait Implementations§
impl Freeze for StatsCollector
impl RefUnwindSafe for StatsCollector
impl Send for StatsCollector
impl Sync for StatsCollector
impl Unpin for StatsCollector
impl UnsafeUnpin for StatsCollector
impl UnwindSafe for StatsCollector
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