Package org.apache.uima.util
Interface InstrumentationFacility
public interface InstrumentationFacility
The
InstrumentationFacility
interface defines a standard way for UIMA components to
be instrumented for performance evaluation. The UIMA framework will provide each UIMA component
with access to an implementation of this interface.
This interface is under development. In its current form, it basically just provides a write-only
interface to a ProcessTrace
object.-
Method Summary
Modifier and TypeMethodDescriptionvoid
Records a completed event with the specified parameters.void
Records the end of an event.void
startEvent
(String aComponentName, String aEventType, String aDescription) Records the start of an event.
-
Method Details
-
startEvent
Records the start of an event. The event will be ended when there is a corresponding call toendEvent(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.- Parameters:
aComponentName
- name of the component generating the eventaEventType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aDescription
- description of the event
-
endEvent
Records the end of an event. The event is identified by the component name and type. If there is no open event that matches those values, aUIMA_IllegalStateException
will be thrown.- Parameters:
aComponentName
- name of the component generating the eventaEventType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aResultMessage
- describes the result of the event- Throws:
UIMA_IllegalStateException
- if there is no open event matching theaComponentName
andaEventType
arguments.
-
addEvent
void addEvent(String aResourceName, String aType, String aDescription, int aDuration, String aResultMsg) Records a completed event with the specified parameters.- Parameters:
aResourceName
- name of the component generating the eventaType
- type of the event. Standard types are defined as constants on theProcessTraceEvent
interface, but any string may be used.aDescription
- description of the eventaDuration
- duration of the event in millisecondsaResultMsg
- result message of event
-