pub struct Stats {
pub time: Duration,
pub calls: f32,
pub frames: f32,
pub objs: Throughput,
pub prims: Throughput,
pub verts: Throughput,
pub frags: Throughput,
/* private fields */
}Expand description
Collects and accumulates rendering statistics and performance data.
Fields§
§time: DurationTime spent rendering.
calls: f32Number of render calls issued.
frames: f32Number of frames rendered.
objs: ThroughputObjects, primitives, vertices, and fragments input/output.
prims: Throughput§verts: Throughput§frags: ThroughputImplementations§
Source§impl Stats
impl Stats
Sourcepub fn start() -> Self
pub fn start() -> Self
Creates a Stats instance that records the time of its creation.
Call finish to write the elapsed time to self.time.
Useful for timing frames, rendering calls, etc.
Equivalent to Stats::new if the std feature is not enabled.
Trait Implementations§
Source§impl AddAssign for Stats
impl AddAssign for Stats
Source§fn add_assign(&mut self, other: Self)
fn add_assign(&mut self, other: Self)
Appends the stats of other to self.
Auto Trait Implementations§
impl Freeze for Stats
impl RefUnwindSafe for Stats
impl Send for Stats
impl Sync for Stats
impl Unpin 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