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

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addEvent(String aResourceName, String aType, String aDescription, int aDuration, String aResultMsg)` Records a completed event with the specified parameters.
    `void` | `endEvent(String aComponentName, String aEventType, String aResultMessage)` Records the end of an event.
    `void` | `startEvent(String aComponentName, String aEventType, String aDescription)` Records the start of an event.

- - ### Method Detail

    - #### startEvent

          void startEvent(String aComponentName,
                          String aEventType,
                          String aDescription)

      Records the start of an event. The event will be ended when there is a corresponding call to `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.
      Parameters:
        `aComponentName` - name of the component generating the event
        `aEventType` - 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

    - #### endEvent

          void endEvent(String aComponentName,
                        String aEventType,
                        String aResultMessage)

      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, a `UIMA_IllegalStateException` will be thrown.
      Parameters:
        `aComponentName` - name of the component generating the event
        `aEventType` - 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
      Throws:
        `UIMA_IllegalStateException` - if there is no open event matching the `aComponentName` and `aEventType` 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 event
        `aType` - 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
        `aDuration` - duration of the event in milliseconds
        `aResultMsg` - result message of event

Copyright © 2006–2017 The Apache Software Foundation. All rights reserved.