pub struct NodeStats {
pub execution_count: u64,
pub total_time: Duration,
pub min_time: Duration,
pub max_time: Duration,
pub memory_allocated: u64,
pub peak_memory: u64,
pub cache_misses: Option<u64>,
pub flops: Option<u64>,
}Expand description
Runtime execution statistics for a single node.
Fields§
§execution_count: u64Number of times executed
total_time: DurationTotal time spent executing this node
min_time: DurationMinimum execution time
max_time: DurationMaximum execution time
memory_allocated: u64Total memory allocated (bytes)
peak_memory: u64Peak memory used (bytes)
cache_misses: Option<u64>Cache misses (if available)
flops: Option<u64>FLOPs executed
Implementations§
Source§impl NodeStats
impl NodeStats
pub fn new() -> Self
Sourcepub fn record_execution(&mut self, duration: Duration, memory: u64)
pub fn record_execution(&mut self, duration: Duration, memory: u64)
Record an execution
Sourcepub fn time_variance(&self) -> Duration
pub fn time_variance(&self) -> Duration
Get time variance (max - min)
Sourcepub fn performance_score(&self) -> f64
pub fn performance_score(&self) -> f64
Get performance score (higher is worse - indicates bottleneck)
Trait Implementations§
Source§impl<'de> Deserialize<'de> for NodeStats
impl<'de> Deserialize<'de> for NodeStats
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 NodeStats
impl RefUnwindSafe for NodeStats
impl Send for NodeStats
impl Sync for NodeStats
impl Unpin for NodeStats
impl UnwindSafe for NodeStats
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