pub struct GraphProfiler { /* private fields */ }Expand description
Collects per-node timing samples during graph execution.
Implementations§
Source§impl GraphProfiler
impl GraphProfiler
Sourcepub fn record(&mut self, node_id: &str, duration_us: u64)
pub fn record(&mut self, node_id: &str, duration_us: u64)
Record an execution duration for node_id.
Sourcepub fn profile(&self, node_id: &str) -> Option<&NodeProfile>
pub fn profile(&self, node_id: &str) -> Option<&NodeProfile>
Retrieve the profile for a specific node.
Sourcepub fn hottest_nodes(&self, n: usize) -> Vec<&NodeProfile>
pub fn hottest_nodes(&self, n: usize) -> Vec<&NodeProfile>
Return the n hottest (highest total execution time) node profiles,
sorted descending by total_us.
Sourcepub fn all_profiles(&self) -> Vec<&NodeProfile>
pub fn all_profiles(&self) -> Vec<&NodeProfile>
Return all profiles as an unsorted slice.
Trait Implementations§
Source§impl Debug for GraphProfiler
impl Debug for GraphProfiler
Source§impl Default for GraphProfiler
impl Default for GraphProfiler
Source§fn default() -> GraphProfiler
fn default() -> GraphProfiler
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for GraphProfiler
impl RefUnwindSafe for GraphProfiler
impl Send for GraphProfiler
impl Sync for GraphProfiler
impl Unpin for GraphProfiler
impl UnsafeUnpin for GraphProfiler
impl UnwindSafe for GraphProfiler
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> 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