[−][src]Struct hprof::ProfileNode
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.
Methods
impl ProfileNode
[src]
pub fn new(parent: Option<Rc<ProfileNode>>, name: &'static str) -> ProfileNode
[src]
pub fn reset(&self)
[src]
Reset this node and its children, seting relevant fields to 0.
pub fn make_child(
&self,
me: Rc<ProfileNode>,
name: &'static str
) -> Rc<ProfileNode>
[src]
&self,
me: Rc<ProfileNode>,
name: &'static str
) -> Rc<ProfileNode>
Create a child named name
.
pub fn call(&self)
[src]
Enter this profile node.
pub fn ret(&self) -> bool
[src]
Return from this profile node, returning true if there are no pending recursive calls.
pub fn print(&self, indent: u32)
[src]
Print out the current timing information in a very naive way.
Uses indent
to determine how deep to indent the line.
Auto Trait Implementations
impl !Send for ProfileNode
impl Unpin for ProfileNode
impl !Sync for ProfileNode
impl !UnwindSafe for ProfileNode
impl !RefUnwindSafe for ProfileNode
Blanket Implementations
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> From<T> for T
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,