|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ITraceStep
Every monitored step in a service call is represented by a trace step.
A trace step at minimum consists of a unique id, that identifies the monitored step within the trace session and the duration (in ms) of the executed step. An example for such an id is the fully qualified class name plus the name of the executed method.
Additionally, most trace steps have a parent and one to several children.
Method Summary | |
---|---|
void |
addChild(ITraceStep child)
Adds a new child to this trace step. |
void |
enter()
Enter the trace step and start time measuring. |
ITraceStep[] |
getChildren()
Returns the list of children for this trace steps. |
long |
getDuration()
Returns the duration of this TraceStep and all children. |
ITraceStepId |
getId()
Return the id of the trace step. |
long |
getIsolatedDuration()
Returns the isolated duration of this TraceStep. |
ITraceStep |
getParent()
Returns the parent of a TraceStep, if any exists. |
boolean |
isActive()
Checks, if the current trace step is active. |
void |
leave()
Leave the trace step and calculate the elapsed time since enter has been called. |
void |
setParent(ITraceStep parent)
Set the parent of a TraceStep. |
Method Detail |
---|
ITraceStepId getId()
void enter()
This method should only be called once for a trace step. All subsequent calls will be ignored.
void leave()
enter
has been called.
The elapsed time is returned by getDuration()
.
Leaving a step implies that all children are left, too.
This method should only be called once for a trace step. All subsequent calls will be ignored.
boolean isActive()
A step is active between the calls to enter
and
leave
.
long getIsolatedDuration()
The duration is the time elapsed between the calls to enter
and leave
minus the durations of all children.
long getDuration()
This value reflects the overall execution time of a trace step between the
calls to enter
and leave
inclusive the
durations of all children.
void addChild(ITraceStep child)
The implementation must make sure that the child receives a references to this
trace step. This reference must be returned by getParent()
.
child
- trace step to add as childITraceStep[] getChildren()
ITraceStep getParent()
void setParent(ITraceStep parent)
This method is invoked when a new child is added using addChild()
. It should
never be called manually.
parent
- new parent of the child.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |