pub struct ResourceAttribution {
pub cpu_timens: Option<u64>,
pub memory_allocated_bytes: Option<u64>,
pub memory_deallocated_bytes: Option<u64>,
pub peak_memory_bytes: Option<u64>,
pub io_operations: Option<u64>,
pub bytes_read: Option<u64>,
pub byteswritten: Option<u64>,
pub network_requests: Option<u64>,
pub gpu_memory_bytes: Option<u64>,
pub gpu_compute_timens: Option<u64>,
}
Expand description
Resource attribution tracker for performance analysis
Fields§
§cpu_timens: Option<u64>
CPU time consumed (in nanoseconds)
memory_allocated_bytes: Option<u64>
Memory allocated (in bytes)
memory_deallocated_bytes: Option<u64>
Memory deallocated (in bytes)
peak_memory_bytes: Option<u64>
Peak memory usage (in bytes)
io_operations: Option<u64>
Number of I/O operations
bytes_read: Option<u64>
Bytes read from I/O
byteswritten: Option<u64>
Bytes written to I/O
network_requests: Option<u64>
Network requests made
gpu_memory_bytes: Option<u64>
GPU memory used (in bytes)
gpu_compute_timens: Option<u64>
GPU compute time (in nanoseconds)
Implementations§
Source§impl ResourceAttribution
impl ResourceAttribution
pub fn new() -> Self
pub fn with_cpu_time(self, cpu_timens: u64) -> Self
pub fn with_memory_allocation(self, bytes: u64) -> Self
pub fn with_io_stats( self, operations: u64, bytes_read: u64, byteswritten: u64, ) -> Self
pub fn with_gpu_stats(self, memory_bytes: u64, compute_timens: u64) -> Self
pub fn merge(&mut self, other: &ResourceAttribution)
Trait Implementations§
Source§impl Clone for ResourceAttribution
impl Clone for ResourceAttribution
Source§fn clone(&self) -> ResourceAttribution
fn clone(&self) -> ResourceAttribution
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for ResourceAttribution
impl Debug for ResourceAttribution
Source§impl Default for ResourceAttribution
impl Default for ResourceAttribution
Source§fn default() -> ResourceAttribution
fn default() -> ResourceAttribution
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ResourceAttribution
impl<'de> Deserialize<'de> for ResourceAttribution
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ResourceAttribution
impl RefUnwindSafe for ResourceAttribution
impl Send for ResourceAttribution
impl Sync for ResourceAttribution
impl Unpin for ResourceAttribution
impl UnwindSafe for ResourceAttribution
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