pub struct NvmlCollector { /* private fields */ }Expand description
Collects per-GPU and per-process statistics from NVML.
Implementations§
Source§impl NvmlCollector
impl NvmlCollector
Sourcepub fn new() -> Self
pub fn new() -> Self
Initializes NVML. Never fails; check NvmlCollector::init_error for the reason
when no GPUs are reported.
Sourcepub fn set_process_utilization(&mut self, enabled: bool)
pub fn set_process_utilization(&mut self, enabled: bool)
Turns the per-process utilization query on or off (off while only the top processes are wanted, as for an overview).
Sourcepub fn init_error(&self) -> Option<&str>
pub fn init_error(&self) -> Option<&str>
The NVML initialization error, if any.
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for NvmlCollector
impl !UnwindSafe for NvmlCollector
impl Freeze for NvmlCollector
impl Send for NvmlCollector
impl Sync for NvmlCollector
impl Unpin for NvmlCollector
impl UnsafeUnpin for NvmlCollector
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