pub struct ProfileNode {
pub name: &'static str,
pub calls: Cell<u32>,
pub total_time: Cell<u64>,
pub start_time: Cell<u64>,
pub recursion: Cell<u32>,
pub parent: Option<Rc<ProfileNode>>,
pub children: RefCell<Vec<Rc<ProfileNode>>>,
}
Expand description
A single node in the profile tree.
NOTE: While the fields are public and are a cell, it is not advisable to modify them.
Fields§
§name: &'static str
§calls: Cell<u32>
Number of calls made to this node.
total_time: Cell<u64>
Total time in ns used by this node and all of its children.
Computed after the last pending ret
.
start_time: Cell<u64>
Timestamp in ns when the first call
was made to this node.
recursion: Cell<u32>
Number of recursive calls made to this node since the first call
.
parent: Option<Rc<ProfileNode>>
Parent in the profile tree.
children: RefCell<Vec<Rc<ProfileNode>>>
Child nodes.
Implementations§
Source§impl ProfileNode
impl ProfileNode
pub fn new(parent: Option<Rc<ProfileNode>>, name: &'static str) -> ProfileNode
Sourcepub fn make_child(
&self,
me: Rc<ProfileNode>,
name: &'static str,
) -> Rc<ProfileNode>
pub fn make_child( &self, me: Rc<ProfileNode>, name: &'static str, ) -> Rc<ProfileNode>
Create a child named name
.
Auto Trait Implementations§
impl !Freeze for ProfileNode
impl !RefUnwindSafe for ProfileNode
impl !Send for ProfileNode
impl !Sync for ProfileNode
impl Unpin for ProfileNode
impl !UnwindSafe for ProfileNode
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