Package com.vaadin.client
Class Profiler.Node
- java.lang.Object
-
- com.vaadin.client.Profiler.Node
-
- Enclosing class:
- Profiler
public static class Profiler.Node extends 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.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Profiler.Node
enterChild(String name, double timestamp)
Creates a new child node or retrieves and existing child and updates its total time and hit count.Collection<Profiler.Node>
getChildren()
Gets the child nodes of this nodeint
getCount()
Gets the number of times this node has been entereddouble
getMaxTimeSpent()
Gets the maximum time spent for one invocation of this node, including time spent in sub nodesdouble
getMinTimeSpent()
Gets the minimum time spent for one invocation of this node, including time spent in sub nodesString
getName()
Gets the name of the nodedouble
getOwnTime()
Gets the total time spent in this node, excluding time spent in sub nodesString
getStringRepresentation(String prefix)
double
getTimeSpent()
Gets the total time spent in this node, including time spent in sub nodesvoid
leave(double timestamp)
void
sumUpTotals(Map<String,Profiler.Node> totals)
String
toString()
-
-
-
Constructor Detail
-
Node
public Node(String name)
Create a new node with the given name.- Parameters:
name
-
-
-
Method Detail
-
getName
public String getName()
Gets the name of the node- Returns:
- the name of the node
-
enterChild
public Profiler.Node enterChild(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 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
public Collection<Profiler.Node> getChildren()
Gets the child nodes of this node- Returns:
- a collection of child nodes
-
sumUpTotals
public void sumUpTotals(Map<String,Profiler.Node> totals)
-
leave
public void leave(double timestamp)
- Parameters:
timestamp
-
-
-