Package org.ow2.clif.datacollector.lib
Class InjectorDataCollector
- java.lang.Object
-
- org.ow2.clif.datacollector.lib.AbstractDataCollector
-
- org.ow2.clif.datacollector.lib.InjectorDataCollector
-
- All Implemented Interfaces:
org.objectweb.fractal.api.control.BindingController,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
Fields Modifier and Type Field Description protected longactionMaxDurationduration of the longest action since the previous call to getStat()protected longactionMinDurationduration of the quickest action since the previous call to getStat()protected longactionTotalDurationtotal amount of time spent by actions since the previous call to getStat()protected doubleactionTotalSquareDurationsum of square response times since the previous call to getStat(), used to compute moving standard deviationprotected longcumulativeErrorstotal number of error occurrences since current test initializationprotected longcumulativeSuccessfullActionstotal number of actions performed since current test initializationprotected longerrorsnumber of error occurrences since the previous call to getStat()static java.lang.String[]LABELSprotected longstatStartTimeabsolute date of previous call to getStat()protected longsuccessfullActionsnumber 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.DataCollectorAdmin
DATA_COLLECTOR_ADMIN
-
Fields inherited from interface org.ow2.clif.datacollector.api.DataCollectorWrite
DATA_COLLECTOR_WRITE
-
-
Constructor Summary
Constructors Constructor Description InjectorDataCollector()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(ActionEvent event)new measure available => call super class' add() method and compute statisticsjava.lang.String[]getLabels()Get labels describing the statisticslong[]getStat()Get statistics computed since previous call (or initialization for 1st call).voidinit(java.io.Serializable testId, java.lang.String scenarioId)new test initialization => call super class' init() method and resets all statistics, including the cumulative ones
-
-
-
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
-
-
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:
initin interfaceDataCollectorWrite- Overrides:
initin classAbstractDataCollector- Parameters:
testId- test identifierscenarioId- blade identifier
-
add
public void add(ActionEvent event)
new measure available => call super class' add() method and compute statistics- Specified by:
addin interfaceDataCollectorWrite- Overrides:
addin classAbstractDataCollector- 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:DataCollectorAdminGet labels describing the statistics- Returns:
- the statistics labels, in the same order as the values returned by getStat()
- See Also:
DataCollectorAdmin.getStat()
-
-