SMILA (incubation) API documentation

org.eclipse.smila.processing.bpel
Class ProcessingPerformanceCounter

java.lang.Object
  extended by org.eclipse.smila.processing.bpel.ProcessingPerformanceCounter
Direct Known Subclasses:
PipeletPerformanceCounter, PipelinePerformanceCounter

public abstract class ProcessingPerformanceCounter
extends java.lang.Object

Base class for performance counters used to measure processing performance. Manages three performance counters for number of invocations, average execution time and errors.

Author:
jschumacher

Constructor Summary
ProcessingPerformanceCounter(java.lang.String elementName)
          create new performance counters for given element.
 
Method Summary
 void addError(java.lang.Throwable ex, boolean isCritical)
          Adds the error.
 void countFailureMillis(long executionTime, int incomingRecords, int outgoingRecords)
          Count a failed invocation.
 void countFailureNanos(long executionTime, int incomingRecords, int outgoingRecords)
          Count a failed invocation.
 void countIds(int incomingRecords, int outgoingRecords)
          Count incoming and outgoing records separately.
 void countInvocationMillis(long executionTime, boolean success, int incomingRecords, int outgoingRecords)
          count an invocation.
 void countInvocationNanos(long executionTime, boolean success, int incomingRecords, int outgoingRecords)
          count an invocation in nano seconds.
 void countSuccessMillis(long executionTime, int incomingRecords, int outgoingRecords)
          count a successful invocation.
 void countSuccessNanos(long executionTime, int incomingRecords, int outgoingRecords)
          count a successful invocation in nanoseconds.
protected  java.lang.String getElementName()
          Gets the element name.
protected abstract  java.lang.String getElementType()
          Gets the element type.
abstract  ManagementAgentLocation getLocation()
          Gets the location.
protected  void registerAgent()
          Register.
 java.lang.String toString()
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProcessingPerformanceCounter

public ProcessingPerformanceCounter(java.lang.String elementName)
create new performance counters for given element.

Parameters:
elementName - name of a element to measure
Method Detail

registerAgent

protected void registerAgent()
Register.


getElementType

protected abstract java.lang.String getElementType()
Gets the element type.

Returns:
name of top level JMX category under "SMILA Processing"

getElementName

protected java.lang.String getElementName()
Gets the element name.

Returns:
name of measured elements.

countSuccessMillis

public void countSuccessMillis(long executionTime,
                               int incomingRecords,
                               int outgoingRecords)
count a successful invocation.

Parameters:
executionTime - time for execution in milliseconds
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countSuccessNanos

public void countSuccessNanos(long executionTime,
                              int incomingRecords,
                              int outgoingRecords)
count a successful invocation in nanoseconds.

Parameters:
executionTime - time for execution in nano seconds
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countFailureMillis

public void countFailureMillis(long executionTime,
                               int incomingRecords,
                               int outgoingRecords)
Count a failed invocation.

Parameters:
executionTime - time for execution in millis seconds
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countFailureNanos

public void countFailureNanos(long executionTime,
                              int incomingRecords,
                              int outgoingRecords)
Count a failed invocation.

Parameters:
executionTime - time for execution in nano seconds
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countInvocationMillis

public void countInvocationMillis(long executionTime,
                                  boolean success,
                                  int incomingRecords,
                                  int outgoingRecords)
count an invocation.

Parameters:
executionTime - time for execution in milli seconds
success - true to count as success, false to count as failure
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countInvocationNanos

public void countInvocationNanos(long executionTime,
                                 boolean success,
                                 int incomingRecords,
                                 int outgoingRecords)
count an invocation in nano seconds.

Parameters:
executionTime - time for execution in nano seconds
success - true to count as success, false to count as failure
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

countIds

public void countIds(int incomingRecords,
                     int outgoingRecords)
Count incoming and outgoing records separately.

Parameters:
incomingRecords - the number of incoming records
outgoingRecords - the number of outgoing records

addError

public void addError(java.lang.Throwable ex,
                     boolean isCritical)
Adds the error.

Parameters:
ex - the ex
isCritical - the is critical

toString

public java.lang.String toString()

Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getLocation

public abstract ManagementAgentLocation getLocation()
Gets the location.

Returns:
the location

SMILA (incubation) API documentation