Package com.vaadin.client
Class Profiler.Node
java.lang.Object
com.vaadin.client.Profiler.Node
- Enclosing class:
- Profiler
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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionenterChild(String name, double timestamp) Creates a new child node or retrieves and existing child and updates its total time and hit count.Gets the child nodes of this node.intgetCount()Gets the number of times this node has been entered.doubleGets the maximum time spent for one invocation of this node, including time spent in sub nodes.doubleGets the minimum time spent for one invocation of this node, including time spent in sub nodes.getName()Gets the name of the node.doubleGets the total time spent in this node, excluding time spent in sub nodes.getStringRepresentation(String prefix) doubleGets the total time spent in this node, including time spent in sub nodes.voidleave(double timestamp) Marks the time spent in the child node.voidsumUpTotals(Map<String, Profiler.Node> totals) toString()
-
Constructor Details
-
Node
Create a new node with the given name.- Parameters:
name- the name of the node
-
-
Method Details
-
getName
Gets the name of the node.- Returns:
- the name of the node
-
enterChild
Creates a new child node or retrieves and existing child and updates its total time and hit count.- Parameters:
name- the name of the childtimestamp- 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
Gets the child nodes of this node.- Returns:
- a collection of child nodes
-
toString
-
getStringRepresentation
-
sumUpTotals
-
leave
public void leave(double timestamp) Marks the time spent in the child node.- Parameters:
timestamp- the timestamp for when the node was left
-