org.ow2.clif.datacollector.lib
Class InjectorDataCollector

java.lang.Object
  extended by org.ow2.clif.datacollector.lib.AbstractDataCollector
      extended by org.ow2.clif.datacollector.lib.InjectorDataCollector
All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController, org.objectweb.fractal.api.control.LifeCycleController, DataCollectorAdmin, DataCollectorWrite

public class InjectorDataCollector
extends AbstractDataCollector

Data collector for load-injectors generating ActionEvent events. statistics: - time frame, i.e. ellapsed time since previous getStat() call - average reponse time during this time frame - max response time during this time frame - min response time during this time frame - number of actions during this time frame - throughput (number of actions/sec) during this time frame - number of error occurrences during this time frame - error rate (number of error/sec) during this time frame - response time standard deviation

Author:
Bruno Dillenseger

Field Summary
protected  long actionMaxDuration
          duration of the longest action since the previous call to getStat()
protected  long actionMinDuration
          duration of the quickest action since the previous call to getStat()
protected  long actionTotalDuration
          total amount of time spent by actions since the previous call to getStat()
protected  double actionTotalSquareDuration
          sum of square response times since the previous call to getStat(), used to compute moving standard deviation
protected  long cumulativeErrors
          total number of error occurrences since current test initialization
protected  long cumulativeSuccessfullActions
          total number of actions performed since current test initialization
protected  long errors
          number of error occurrences since the previous call to getStat()
static java.lang.String[] LABELS
           
protected  long statStartTime
          absolute date of previous call to getStat()
protected  long successfullActions
          number of successful actions performed since the previous call to getStat()
 
Fields inherited from class org.ow2.clif.datacollector.lib.AbstractDataCollector
sws
 
Fields inherited from interface org.ow2.clif.datacollector.api.DataCollectorWrite
DATA_COLLECTOR_WRITE
 
Fields inherited from interface org.ow2.clif.datacollector.api.DataCollectorAdmin
DATA_COLLECTOR_ADMIN
 
Fields inherited from interface org.objectweb.fractal.api.control.LifeCycleController
STARTED, STOPPED
 
Constructor Summary
InjectorDataCollector()
           
 
Method Summary
 void add(ActionEvent event)
          new measure available => call super class' add() method and compute statistics
 java.lang.String[] getLabels()
          Get labels describing the statistics
 long[] getStat()
          Get statistics computed since previous call (or initialization for 1st call).
 void init(java.io.Serializable testId, java.lang.String scenarioId)
          new test initialization => call super class' init() method and resets all statistics, including the cumulative ones
 
Methods inherited from class org.ow2.clif.datacollector.lib.AbstractDataCollector
add, add, add, bindFc, getFcState, listFc, lookupFc, setFilter, startFc, stopFc, terminate, unbindFc
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABELS

public static final java.lang.String[] LABELS

statStartTime

protected long statStartTime
absolute date of previous call to getStat()


successfullActions

protected long successfullActions
number of successful actions performed since the previous call to getStat()


errors

protected long errors
number of error occurrences since the previous call to getStat()


actionMinDuration

protected long actionMinDuration
duration of the quickest action since the previous call to getStat()


actionMaxDuration

protected long actionMaxDuration
duration of the longest action since the previous call to getStat()


actionTotalDuration

protected long actionTotalDuration
total amount of time spent by actions since the previous call to getStat()


actionTotalSquareDuration

protected double actionTotalSquareDuration
sum of square response times since the previous call to getStat(), used to compute moving standard deviation


cumulativeSuccessfullActions

protected long cumulativeSuccessfullActions
total number of actions performed since current test initialization


cumulativeErrors

protected long cumulativeErrors
total number of error occurrences since current test initialization

Constructor Detail

InjectorDataCollector

public InjectorDataCollector()
Method Detail

init

public void init(java.io.Serializable testId,
                 java.lang.String scenarioId)
new test initialization => call super class' init() method and resets all statistics, including the cumulative ones

Specified by:
init in interface DataCollectorWrite
Overrides:
init in class AbstractDataCollector
Parameters:
testId - test identifier
scenarioId - blade identifier

add

public void add(ActionEvent event)
new measure available => call super class' add() method and compute statistics

Specified by:
add in interface DataCollectorWrite
Overrides:
add in class AbstractDataCollector
Parameters:
event - the new action event

getStat

public long[] getStat()
Get statistics computed since previous call (or initialization for 1st call).

Returns:
injector action statistics
See Also:
DataCollectorAdmin.getLabels()

getLabels

public java.lang.String[] getLabels()
Description copied from interface: DataCollectorAdmin
Get labels describing the statistics

Returns:
the statistics labels, in the same order as the values returned by getStat()
See Also:
DataCollectorAdmin.getStat()