Package org.opencms.db.timing
Class CmsThreadStatsTreeProfilingHandler.Node
- java.lang.Object
-
- org.opencms.db.timing.CmsThreadStatsTreeProfilingHandler.Node
-
- Enclosing class:
- CmsThreadStatsTreeProfilingHandler
public static class CmsThreadStatsTreeProfilingHandler.Node extends java.lang.Object
The tree node.
-
-
Constructor Summary
Constructors Constructor Description Node(java.lang.Object key)
Creates a new node.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addCall(long nanos)
Updates the count / nanos for this node.CmsThreadStatsTreeProfilingHandler.Node
addOrGetChild(java.lang.Object key)
Gets the child for a given key, or adds it if it doesn't exist yet.CmsThreadStatsTreeProfilingHandler.Node
addOrGetDescendant(java.util.List<?> path)
Gets the descendant for a given path, or adds it if it doesn't exist yet.void
computeCumulativeData()
Computes the cumulative driver call count and nanos.void
dump(org.dom4j.Element parent)
Computes XML structure for this node and its descendants and appends it to a given element.static org.dom4j.Document
dumpTree(CmsThreadStatsTreeProfilingHandler.Node node)
Computes the cumulative stats for a tree and dumps it to an XML document.java.lang.Object
getKey()
Gets the key for the node.
-
-
-
Constructor Detail
-
Node
public Node(java.lang.Object key)
Creates a new node.- Parameters:
key
- the key for this node
-
-
Method Detail
-
dumpTree
public static org.dom4j.Document dumpTree(CmsThreadStatsTreeProfilingHandler.Node node)
Computes the cumulative stats for a tree and dumps it to an XML document.- Parameters:
node
- the root node- Returns:
- the resulting XML document
-
addCall
public void addCall(long nanos)
Updates the count / nanos for this node.- Parameters:
nanos
- the nanoseconds to add
-
addOrGetChild
public CmsThreadStatsTreeProfilingHandler.Node addOrGetChild(java.lang.Object key)
Gets the child for a given key, or adds it if it doesn't exist yet.- Parameters:
key
- the key- Returns:
- the child
-
addOrGetDescendant
public CmsThreadStatsTreeProfilingHandler.Node addOrGetDescendant(java.util.List<?> path)
Gets the descendant for a given path, or adds it if it doesn't exist yet.- Parameters:
path
- the path- Returns:
- the descendant
-
computeCumulativeData
public void computeCumulativeData()
Computes the cumulative driver call count and nanos.
-
dump
public void dump(org.dom4j.Element parent)
Computes XML structure for this node and its descendants and appends it to a given element.- Parameters:
parent
- the parent element
-
getKey
public java.lang.Object getKey()
Gets the key for the node.- Returns:
- tbe key
-
-