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.

  • Constructor Details

    • Node

      public Node(String name)
      Create a new node with the given name.
      Parameters:
      name - the name of the node
  • Method Details

    • 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 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 Collection<Profiler.Node> getChildren()
      Gets the child nodes of this node.
      Returns:
      a collection of child nodes
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getStringRepresentation

      public String getStringRepresentation(String prefix)
    • sumUpTotals

      public void sumUpTotals(Map<String,Profiler.Node> totals)
    • leave

      public void leave(double timestamp)
      Marks the time spent in the child node.
      Parameters:
      timestamp - the timestamp for when the node was left