com.vaadin.client.debug.internal
Class ProfilerSection.Node

java.lang.Object
  extended by com.vaadin.client.debug.internal.ProfilerSection.Node
Enclosing class:
ProfilerSection

public static class ProfilerSection.Node
extends java.lang.Object

A hierarchical representation of the time spent running a named block of code.

Warning! This class is most likely to change in the future and is therefore defined in this class in an internal package instead of Profiler where it might seem more logical.


Constructor Summary
ProfilerSection.Node(java.lang.String name)
          Create a new node with the given name.
 
Method Summary
 ProfilerSection.Node enterChild(java.lang.String name, double timestamp)
          Creates a new child node or retrieves and existing child and updates its total time and hit count.
 java.util.Collection<ProfilerSection.Node> getChildren()
          Gets the child nodes of this node
 int getCount()
          Gets the number of times this node has been entered
 double getMaxTimeSpent()
          Gets the maximum time spent for one invocation of this node, including time spent in sub nodes
 double getMinTimeSpent()
          Gets the minimum time spent for one invocation of this node, including time spent in sub nodes
 java.lang.String getName()
          Gets the name of the node
 double getOwnTime()
          Gets the total time spent in this node, excluding time spent in sub nodes
 java.lang.String getStringRepresentation(java.lang.String prefix)
           
 double getTimeSpent()
          Gets the total time spent in this node, including time spent in sub nodes
 void leave(double timestamp)
           
 void sumUpTotals(java.util.Map<java.lang.String,ProfilerSection.Node> totals)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProfilerSection.Node

public ProfilerSection.Node(java.lang.String name)
Create a new node with the given name.

Parameters:
name -
Method Detail

getName

public java.lang.String getName()
Gets the name of the node

Returns:
the name of the node

enterChild

public ProfilerSection.Node enterChild(java.lang.String name,
                                       double timestamp)
Creates a new child node or retrieves and existing child and updates its total time and hit count.

Parameters:
name - the name of the child
timestamp - the timestamp for when the node is entered
Returns:
the child node object

getTimeSpent

public double getTimeSpent()
Gets the total time spent in this node, including time spent in sub nodes

Returns:
the total time spent, in milliseconds

getMinTimeSpent

public double getMinTimeSpent()
Gets the minimum time spent for one invocation of this node, including time spent in sub nodes

Returns:
the time spent for the fastest invocation, in milliseconds

getMaxTimeSpent

public double getMaxTimeSpent()
Gets the maximum time spent for one invocation of this node, including time spent in sub nodes

Returns:
the time spent for the slowest invocation, in milliseconds

getCount

public int getCount()
Gets the number of times this node has been entered

Returns:
the number of times the node has been entered

getOwnTime

public double getOwnTime()
Gets the total time spent in this node, excluding time spent in sub nodes

Returns:
the total time spent, in milliseconds

getChildren

public java.util.Collection<ProfilerSection.Node> getChildren()
Gets the child nodes of this node

Returns:
a collection of child nodes

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getStringRepresentation

public java.lang.String getStringRepresentation(java.lang.String prefix)

sumUpTotals

public void sumUpTotals(java.util.Map<java.lang.String,ProfilerSection.Node> totals)

leave

public void leave(double timestamp)
Parameters:
timestamp -


Copyright © 2000-2014 Vaadin Ltd. All Rights Reserved.