pub struct ExecutionTrace { /* private fields */ }Expand description
Execution trace containing recorded operations.
Implementations§
Source§impl ExecutionTrace
impl ExecutionTrace
Sourcepub fn with_graph_id(self, graph_id: usize) -> Self
pub fn with_graph_id(self, graph_id: usize) -> Self
Set the graph ID for this trace.
Sourcepub fn add_entry(&mut self, entry: TraceEntry)
pub fn add_entry(&mut self, entry: TraceEntry)
Add a trace entry.
Sourcepub fn entries(&self) -> &[TraceEntry]
pub fn entries(&self) -> &[TraceEntry]
Get all trace entries.
Sourcepub fn total_duration(&self) -> Duration
pub fn total_duration(&self) -> Duration
Get the total execution duration.
Sourcepub fn total_duration_ms(&self) -> f64
pub fn total_duration_ms(&self) -> f64
Get the total duration in milliseconds.
Sourcepub fn entries_for_node(&self, node_id: usize) -> Vec<&TraceEntry>
pub fn entries_for_node(&self, node_id: usize) -> Vec<&TraceEntry>
Get entries for a specific node.
Sourcepub fn critical_path(&self) -> Vec<&TraceEntry>
pub fn critical_path(&self) -> Vec<&TraceEntry>
Get the critical path (longest chain of dependent operations).
Uses dependency tracking via input/output tensor IDs to compute the critical path. The critical path is the longest chain of operations where each depends on the previous, determining the minimum possible execution time.
Sourcepub fn critical_path_duration(&self) -> Duration
pub fn critical_path_duration(&self) -> Duration
Get the total critical path duration.
Sourcepub fn parallelism_factor(&self) -> f64
pub fn parallelism_factor(&self) -> f64
Calculate the parallelism factor (total work / critical path time). Values > 1 indicate potential for parallel execution.
Sourcepub fn slowest_operations(&self, limit: usize) -> Vec<&TraceEntry>
pub fn slowest_operations(&self, limit: usize) -> Vec<&TraceEntry>
Get operations sorted by duration (slowest first).
Sourcepub fn summary(&self) -> TraceSummary
pub fn summary(&self) -> TraceSummary
Generate a summary report.
Trait Implementations§
Source§impl Clone for ExecutionTrace
impl Clone for ExecutionTrace
Source§fn clone(&self) -> ExecutionTrace
fn clone(&self) -> ExecutionTrace
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 ExecutionTrace
impl Debug for ExecutionTrace
Auto Trait Implementations§
impl Freeze for ExecutionTrace
impl RefUnwindSafe for ExecutionTrace
impl Send for ExecutionTrace
impl Sync for ExecutionTrace
impl Unpin for ExecutionTrace
impl UnwindSafe for ExecutionTrace
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