|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ProcessTrace
A ProcessTrace object keeps a record of events that have occurred and information,
such as timing, about those events.
Each event is represented by a ProcessTraceEvent object. Events may have sub-events, so a
ProcessTrace is really a forest of events, which provides a useful description of where time is
spent during a process involving several components.
| Method Summary | |
|---|---|
void |
addAll(List<ProcessTraceEvent> aEventList)
Adds a list of completed event objects to this ProcessTrace. |
void |
addEvent(ProcessTraceEvent aEvent)
Adds a completed event object to this ProcessTrace. |
void |
addEvent(String aResourceName,
String aType,
String aDescription,
int aDuration,
String aResultMsg)
Adds an event with the specified parameters to this ProcessTrace. |
void |
aggregate(ProcessTrace aProcessTrace)
Aggregates the information in another ProcessTrace with this one. |
void |
clear()
Resets this ProcessTrace by removing all events. |
void |
endEvent(String aComponentName,
String aEventType,
String aResultMessage)
Records the end of an event. |
ProcessTraceEvent |
getEvent(String aComponentName,
String aType)
Get a specified event. |
List<ProcessTraceEvent> |
getEvents()
Gets a list of ProcessTraceEvents, in the order in which they were created. |
List<ProcessTraceEvent> |
getEventsByComponentName(String aComponentName,
boolean aRecurseWithinMatch)
Gets all events that have the given Component name. |
List<ProcessTraceEvent> |
getEventsByType(String aType,
boolean aRecurseWithinMatch)
Gets all events that have the given type |
void |
startEvent(String aComponentName,
String aEventType,
String aDescription)
Records the start of an event. |
String |
toString()
Generates a user-readable representation of all events in this ProcessTrace. |
| Method Detail |
|---|
void startEvent(String aComponentName,
String aEventType,
String aDescription)
endEvent(String,String,String) with the same component name and event type. The
duration of the event will be automatically computed from the difference in time between the
start and end.
aComponentName - name of the component generating the eventaEventType - type of the event. Standard types are defined as constants on the
ProcessTraceEvent interface, but any string may be used.aDescription - description of the event
void endEvent(String aComponentName,
String aEventType,
String aResultMessage)
UIMA_IllegalStateException will be
thrown.
aComponentName - name of the component generating the eventaEventType - type of the event. Standard types are defined as constants on the
ProcessTraceEvent interface, but any string may be used.aResultMessage - describes the result of the event
UIMA_IllegalStateException - if there is no open event matching the aComponentName and
aEventType arguments.
void addEvent(String aResourceName,
String aType,
String aDescription,
int aDuration,
String aResultMsg)
ProcessTrace.
aResourceName - name of the component generating the eventaType - type of the event. Standard types are defined as constants on the
ProcessTraceEvent interface, but any string may be used.aDescription - description of the eventaDuration - duration of the event in millisecondsaResultMsg - result message of eventvoid addEvent(ProcessTraceEvent aEvent)
ProcessTrace. This method is useful for
copying events from one ProcessTrace into another.
aEvent - the event object to be added to this ProcessTracevoid addAll(List<ProcessTraceEvent> aEventList)
ProcessTrace. This method is
useful for copying events from one ProcessTrace into another.
aEventList - a List of event object to be added to this ProcessTraceList<ProcessTraceEvent> getEvents()
ProcessTraceEvents, in the order in which they were created. This is
generally chronological order.
ProcessTraceEvents
List<ProcessTraceEvent> getEventsByComponentName(String aComponentName,
boolean aRecurseWithinMatch)
aComponentName - the component name to look foraRecurseWithinMatch - if true, all events with the given component name will be returned. If false, this
method will not recurse into the sub-events of a matching event.
List<ProcessTraceEvent> getEventsByType(String aType,
boolean aRecurseWithinMatch)
aType - the type of event to look foraRecurseWithinMatch - if true, all events with the given component name will be returned. If false, this
method will not recurse into the sub-events of a matching event.
ProcessTraceEvent getEvent(String aComponentName,
String aType)
aComponentName - name of component producing desired eventaType - type of desired event
null if there is no
such event.void clear()
ProcessTrace by removing all events.
void aggregate(ProcessTrace aProcessTrace)
ProcessTrace with this one. Events that
exist in both ProcessTraces will have their durations added together. This method is useful for
collecting aggregate performance statistics for collection processing.
aProcessTrace - the Process Trace object whose information will be combined with the information in
this objectString toString()
ProcessTrace.
toString in class ObjectProcessTrace.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||