pub struct GpuUsage {
pub gpu_ns: u64,
pub busy_ns: u64,
pub mem_ns: u64,
}Expand description
One process’s GPU counters, accumulated over its open DRM file descriptors.
A process can hold several DRM fds (render node, card node), so this is a sum rather than one device’s figure. That is the right shape for a process table: the question a row answers is “how much GPU is this program using”, not “which node is it using”.
Fields§
§gpu_ns: u64Cumulative nanoseconds of GPU time attributed to this process.
busy_ns: u64Cumulative nanoseconds the GPU was busy while this process had work
queued. The percentage is drm-engine-* divided by this, which is why the
engine figure alone is not a percentage.
mem_ns: u64Cumulative nanoseconds of memory cycles, on drivers that report it.
Implementations§
Trait Implementations§
impl Copy for GpuUsage
impl Eq for GpuUsage
impl StructuralPartialEq for GpuUsage
Auto Trait Implementations§
impl Freeze for GpuUsage
impl RefUnwindSafe for GpuUsage
impl Send for GpuUsage
impl Sync for GpuUsage
impl Unpin for GpuUsage
impl UnsafeUnpin for GpuUsage
impl UnwindSafe for GpuUsage
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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