pub struct ExecutionProfile {
pub node_stats: HashMap<usize, NodeStats>,
pub tensor_stats: HashMap<usize, TensorStats>,
pub total_executions: u64,
pub critical_path: Vec<usize>,
}Expand description
Execution profile for entire graph.
Fields§
§node_stats: HashMap<usize, NodeStats>Per-node statistics
tensor_stats: HashMap<usize, TensorStats>Per-tensor statistics (size, reuse count)
total_executions: u64Total graph executions
critical_path: Vec<usize>Critical path (longest execution chain)
Implementations§
Source§impl ExecutionProfile
impl ExecutionProfile
pub fn new() -> Self
Sourcepub fn record_node(&mut self, node_id: usize, duration: Duration, memory: u64)
pub fn record_node(&mut self, node_id: usize, duration: Duration, memory: u64)
Record node execution
Sourcepub fn record_tensor_access(&mut self, tensor_id: usize, size: usize)
pub fn record_tensor_access(&mut self, tensor_id: usize, size: usize)
Record tensor access
Sourcepub fn get_hot_nodes(&self, n: usize) -> Vec<(usize, f64)>
pub fn get_hot_nodes(&self, n: usize) -> Vec<(usize, f64)>
Get hot nodes (top N by performance score)
Sourcepub fn get_memory_intensive_nodes(&self, threshold: u64) -> Vec<usize>
pub fn get_memory_intensive_nodes(&self, threshold: u64) -> Vec<usize>
Get memory-intensive nodes
Sourcepub fn merge(&mut self, other: &ExecutionProfile)
pub fn merge(&mut self, other: &ExecutionProfile)
Merge another profile (for multi-run averaging)
Trait Implementations§
Source§impl Clone for ExecutionProfile
impl Clone for ExecutionProfile
Source§fn clone(&self) -> ExecutionProfile
fn clone(&self) -> ExecutionProfile
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 ExecutionProfile
impl Debug for ExecutionProfile
Source§impl Default for ExecutionProfile
impl Default for ExecutionProfile
Source§fn default() -> ExecutionProfile
fn default() -> ExecutionProfile
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ExecutionProfile
impl<'de> Deserialize<'de> for ExecutionProfile
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 ExecutionProfile
impl RefUnwindSafe for ExecutionProfile
impl Send for ExecutionProfile
impl Sync for ExecutionProfile
impl Unpin for ExecutionProfile
impl UnwindSafe for ExecutionProfile
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