[][src]Struct hprof::ProfileNode

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>>>,
}

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 strcalls: 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]

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]

impl<T> From<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

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

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]