Skip to main content

ExecutionTracer

Struct ExecutionTracer 

Source
pub struct ExecutionTracer { /* private fields */ }
Expand description

Execution tracer for recording operation flow.

Implementations§

Source§

impl ExecutionTracer

Source

pub fn new() -> Self

Create a new execution tracer.

Source

pub fn enable(&mut self)

Enable tracing.

Source

pub fn disable(&mut self)

Disable tracing.

Source

pub fn is_enabled(&self) -> bool

Check if tracing is enabled.

Source

pub fn start_trace(&mut self, graph_id: Option<usize>)

Start a new trace (finalizes current trace if any).

Source

pub fn finalize_trace(&mut self)

Finalize the current trace and store it.

Source

pub fn record_operation_start( &mut self, _node_id: usize, _operation: impl Into<String>, _input_ids: Vec<usize>, ) -> OperationHandle

Record the start of an operation.

Source

pub fn record_operation_end( &mut self, handle: OperationHandle, node_id: usize, operation: impl Into<String>, input_ids: Vec<usize>, output_ids: Vec<usize>, metadata: HashMap<String, String>, )

Record the end of an operation.

Source

pub fn get_trace(&self) -> &ExecutionTrace

Get the current trace.

Source

pub fn get_all_traces(&self) -> &[ExecutionTrace]

Get all recorded traces.

Source

pub fn clear(&mut self)

Clear all traces.

Trait Implementations§

Source§

impl Default for ExecutionTracer

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V