com.waveset.util
Class CallTree
java.lang.Object
com.waveset.util.AbstractXmlObject
com.waveset.util.CallTree
- All Implemented Interfaces:
- javax.naming.Referenceable, XmlObject
- public class CallTree
- extends AbstractXmlObject
A network of methods that call each other
.
Supports serialization as XML so we can dump it to a file.
Field Summary |
static java.lang.String |
code_id
|
static java.lang.String |
ELEMENT
|
Constructor Summary |
CallTree(org.w3c.dom.Element e)
Create a call tree object by parsing its XML representation. |
Methods inherited from class com.waveset.util.AbstractXmlObject |
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
code_id
public static final java.lang.String code_id
- See Also:
- Constant Field Values
ELEMENT
public static final java.lang.String ELEMENT
- See Also:
- Constant Field Values
CallTree
public CallTree(org.w3c.dom.Element e)
throws WavesetException
- Create a call tree object by parsing its XML representation.
recordCall
public static void recordCall(java.lang.String caller,
java.lang.String callee)
recordReturn
public static void recordReturn(java.lang.String caller,
java.lang.String callee,
long elapsedTime,
boolean isError)
getStatistics
public static CallStatistics[] getStatistics()
- Returns:
- aggregate
statistics
for all methods.
getStatistics
public static CallStatistics getStatistics(java.lang.String methodName)
- Returns:
- aggregate
statistics
for the specified method.
Aggregate statistics are summary timings for a method,
not broken down caller.
getStatistics
public static CallStatistics getStatistics(java.lang.String methodName,
java.lang.String caller)
- Returns:
- caller-specific
call statistics
for the specified method in the context of the specified caller.
Caller-specific statistics are timings of a specified method
when called by the specified caller.
listCallersOf
public static java.util.List listCallersOf(java.lang.String methodName)
- Returns:
- a list of methods that call the specified method.
Each item in the List is a String.
listCalledBy
public static java.util.List listCalledBy(java.lang.String methodName)
- Returns:
- a list of methods that the specified method calls.
Each item in the List is a String.
listMethodNames
public static java.util.List listMethodNames()
- Returns:
- a list of methods that the specified method calls.
Each item in the List is a String.
getElementName
public java.lang.String getElementName()
- Description copied from class:
AbstractXmlObject
- Return the element name.
- Specified by:
getElementName
in interface XmlObject
- Specified by:
getElementName
in class AbstractXmlObject
toXml
public void toXml(java.lang.StringBuffer b,
int indent)
- Serialize the call tree to an XML string buffer.
- Specified by:
toXml
in interface XmlObject
- Specified by:
toXml
in class AbstractXmlObject