pub struct CallTreeNode {
pub name: String,
pub duration_ms: u64,
pub self_time_ms: u64,
pub children: Vec<CallTreeNode>,
}Expand description
A node in the call tree.
Fields§
§name: StringOperation name
duration_ms: u64Total duration including children
self_time_ms: u64Time spent in this operation only (excluding children)
children: Vec<CallTreeNode>Child operations
Implementations§
Source§impl CallTreeNode
impl CallTreeNode
Sourcepub fn percentage(&self, total_duration_ms: u64) -> f64
pub fn percentage(&self, total_duration_ms: u64) -> f64
Get the percentage of time spent in this node relative to the total.
Sourcepub fn self_percentage(&self, total_duration_ms: u64) -> f64
pub fn self_percentage(&self, total_duration_ms: u64) -> f64
Get the self-time percentage.
Sourcepub fn most_expensive_children(&self, limit: usize) -> Vec<&CallTreeNode>
pub fn most_expensive_children(&self, limit: usize) -> Vec<&CallTreeNode>
Find the most expensive child operations.
Trait Implementations§
Source§impl Clone for CallTreeNode
impl Clone for CallTreeNode
Source§fn clone(&self) -> CallTreeNode
fn clone(&self) -> CallTreeNode
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 CallTreeNode
impl Debug for CallTreeNode
Source§impl<'de> Deserialize<'de> for CallTreeNode
impl<'de> Deserialize<'de> for CallTreeNode
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 CallTreeNode
impl RefUnwindSafe for CallTreeNode
impl Send for CallTreeNode
impl Sync for CallTreeNode
impl Unpin for CallTreeNode
impl UnsafeUnpin for CallTreeNode
impl UnwindSafe for CallTreeNode
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