Package org.opencms.db.timing
Class CmsThreadStatsTreeProfilingHandler.Node
java.lang.Object
org.opencms.db.timing.CmsThreadStatsTreeProfilingHandler.Node
- Enclosing class:
- CmsThreadStatsTreeProfilingHandler
The tree node.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCall
(long nanos) Updates the count / nanos for this node.addOrGetChild
(Object key) Gets the child for a given key, or adds it if it doesn't exist yet.addOrGetDescendant
(List<?> path) Gets the descendant for a given path, or adds it if it doesn't exist yet.void
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
Computes the cumulative stats for a tree and dumps it to an XML document.getKey()
Gets the key for the node.
-
Constructor Details
-
Node
Creates a new node.- Parameters:
key
- the key for this node
-
-
Method Details
-
dumpTree
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
Updates the count / nanos for this node.- Parameters:
nanos
- the nanoseconds to add
-
addOrGetChild
Gets the child for a given key, or adds it if it doesn't exist yet.- Parameters:
key
- the key- Returns:
- the child
-
addOrGetDescendant
Gets the descendant for a given path, or adds it if it doesn't exist yet.- Parameters:
path
- the path- Returns:
- the descendant
-
computeCumulativeData
Computes the cumulative driver call count and nanos. -
dump
Computes XML structure for this node and its descendants and appends it to a given element.- Parameters:
parent
- the parent element
-
getKey
Gets the key for the node.- Returns:
- tbe key
-