Package com.ibm.wsspi.timedoperations

Timed operations help WebSphere Application Server administrators see, by way of a logged warning, when certain operations in their application server are running more slowly than expected.

See: Description

  • Interface Summary 
    Interface Description
    TimedOperation
    Timed operations help WebSphere Application Server administrators see, by way of a logged warning, when certain operations in their application server are running more slowly than expected.
    TimedOperationsTransformDescriptor
    TimedOperationsTransformDescriptor is used to define the various "Timed Operations" which the user wants to monitor.
  • Class Summary 
    Class Description
    TimedOperationService
    The TimedOperationService controls the enablement of all timed operations and manages the TimedOperation instances.

Package com.ibm.wsspi.timedoperations Description

Timed operations help WebSphere Application Server administrators see, by way of a logged warning, when certain operations in their application server are running more slowly than expected.

The system looks for abnormal patterns in the durations of instrumented calls, by keeping track of several recent durations and computing the mean and standard deviation for each of these timed operations. Specific messages are logged so that administrators know what is slow when an abnormal pattern is detected.

The timed operation feature uses a moving average, and a certain number of durations are excluded from calculations in order to avoid a high variance during the warm-up period.

Timed operations are disabled by default and are enabled by adding the "timedOperations-1.0" element to the server.xml file.

Since features can be added to and removed from the server configuration without server restarts, the use of the TimedOperationService is supported only in the following scenario in order to make sure that your bundle resolution does not fail because of an unresolved import when the timedOperations-1.0 feature is not configured.

Your bundle provides the timed operations monitoring only when the timedOperations-1.0 is also enabled. Therefore you need to separate the code that provides the timed operations function into its own feature, and declare it to be an 'auto feature', which means that users don't directly configure it in their server.xml but it will be added by the feature manager if both your feature and the timedOperations-1.0 feature are configured. This way you ensure that all the required packages will be available in the framework.

The code snippet below shows a sample instrumentation:

 
     void someMethod(String preparedStatement) {          
         TimedOperation timedOperationSQL = TimedOperationService.getTimedOperation("JDBC",preparedStatement);
         long token = timedOperationSQL1.start(); 
                
         // 
         // method body being timed 
         // 
           
        timedOperationSQL.stopAndCheck(token); 
     }