pub struct GpuStats { /* private fields */ }Expand description
Accumulated GPU statistics over a recording period.
Implementations§
Source§impl GpuStats
impl GpuStats
Sourcepub fn record(&mut self, sample: &GpuStatSample)
pub fn record(&mut self, sample: &GpuStatSample)
Record a GpuStatSample.
Sourcepub fn utilization_pct(&self) -> f64
pub fn utilization_pct(&self) -> f64
Average utilization percentage over all recorded samples.
Sourcepub fn memory_pct(&self) -> f64
pub fn memory_pct(&self) -> f64
Average memory usage as a percentage of total VRAM.
Sourcepub fn peak_temperature(&self) -> Option<f64>
pub fn peak_temperature(&self) -> Option<f64>
Peak temperature recorded.
Sourcepub fn avg_power_draw_mw(&self) -> f64
pub fn avg_power_draw_mw(&self) -> f64
Average power draw in milliwatts.
Sourcepub fn sample_count(&self) -> usize
pub fn sample_count(&self) -> usize
Total number of recorded samples across all stat types.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for GpuStats
impl RefUnwindSafe for GpuStats
impl Send for GpuStats
impl Sync for GpuStats
impl Unpin for GpuStats
impl UnsafeUnpin for GpuStats
impl UnwindSafe for GpuStats
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more