Package org.apache.uima.util
Interface ProcessTraceEvent
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ProcessTraceEvent_impl
Captures information, including timing, about an event that occurred during processing. Events
may have sub-events that further break down the steps involved in a complex process.
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionRetrieves the name of the component that is performing this event.Retrieves the description of this event.int
Gets the duration of this event.int
Gets the duration of this event, minus the sum of the durations of its direct sub-events.Retrieves the result message of this event.Gets the sub-events of this event.getType()
Gets the type of event.toString()
Generates a user-readable representation of this event and its sub-events.void
toString
(StringBuffer aBuf, int aIndentLevel) Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.void
toString
(StringBuffer aBuf, int aIndentLevel, int aTotalTime) Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer.
-
Field Details
-
ANALYSIS_ENGINE
Constant for the ANALYSIS_ENGINE event type. This represents the time spent in the Analysis Engine, including the annotator's analysis and framework overhead.- See Also:
-
ANALYSIS
Constant for the ANALYSIS event type. This represents the actual analysis performed by an annotator.- See Also:
-
SERVICE
Constant for the SERVICE event type. This represents the total time spent in execution of a remote service (not including communication and marshalling/unmarshalling overhead).- See Also:
-
SERVICE_CALL
Constant for the SERVICE_CALL event type. This represents the total time spent making a call on a remote service, including marshalling and unmarshalling.- See Also:
-
-
Method Details
-
getComponentName
String getComponentName()Retrieves the name of the component that is performing this event.- Returns:
- the component name
-
getType
String getType()Gets the type of event. Standard values for this property are defined as constants on this interface, but any String is allowed.- Returns:
- the event type
-
getDescription
String getDescription()Retrieves the description of this event.- Returns:
- the event Description
-
getDuration
int getDuration()Gets the duration of this event.- Returns:
- the duration of this event, in milliseconds.
-
getResultMessage
String getResultMessage()Retrieves the result message of this event.- Returns:
- the event's result message
-
getSubEvents
List<ProcessTraceEvent> getSubEvents()Gets the sub-events of this event.- Returns:
- a List containing other
ProcessTraceEvent
objects
-
getDurationExcludingSubEvents
int getDurationExcludingSubEvents()Gets the duration of this event, minus the sum of the durations of its direct sub-events.- Returns:
- the duration of this event in milliseconds, excluding the time spent in its sub-events
-
toString
String toString()Generates a user-readable representation of this event and its sub-events. -
toString
Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. This is useful for writing nested events.- Parameters:
aBuf
- string buffer to add toaIndentLevel
- indentation level
-
toString
Generates a user-readable representation of this event and its subevents, using the given indentation level and writing to a StringBuffer. Also, if the total time for all events is known, this method will print the percentage of time used by this event and its subevents.- Parameters:
aBuf
- string buffer to add toaIndentLevel
- indentation levelaTotalTime
- total time, used to calculate percentags. If not known, pass 0.
-