|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jminor.common.model.LoadTestModel<T>
T
- the type of the applications this load test usespublic abstract class LoadTestModel<T>
A default LoadTest implementation.
Nested Class Summary | |
---|---|
static class |
LoadTestModel.AbstractUsageScenario<T>
An abstract usage scenario. |
Nested classes/interfaces inherited from interface org.jminor.common.model.LoadTest |
---|
LoadTest.ScenarioException, LoadTest.UsageScenario<T> |
Field Summary | |
---|---|
static int |
DEFAULT_CHART_DATA_UPDATE_INTERVAL_MS
|
static int |
DEFAULT_WARNING_TIME_MS
|
protected static org.slf4j.Logger |
LOG
|
protected static Random |
RANDOM
|
Constructor Summary | |
---|---|
LoadTestModel(User user,
Collection<? extends LoadTest.UsageScenario<T>> usageScenarios,
int maximumThinkTime,
int loginDelayFactor,
int applicationBatchSize)
Constructs a new LoadTestModel. |
|
LoadTestModel(User user,
Collection<? extends LoadTest.UsageScenario<T>> usageScenarios,
int maximumThinkTime,
int loginDelayFactor,
int applicationBatchSize,
int warningTime)
Constructs a new LoadTestModel. |
|
LoadTestModel(User user,
int maximumThinkTime,
int loginDelayFactor,
int applicationBatchSize)
Constructs a new LoadTestModel. |
|
LoadTestModel(User user,
int maximumThinkTime,
int loginDelayFactor,
int applicationBatchSize,
int warningTime)
Constructs a new LoadTestModel. |
Method Summary | |
---|---|
void |
addApplicationBatch()
Adds a batch of applications. |
protected void |
addExitListener(ActionListener listener)
|
EventObserver |
applicationBatchSizeObserver()
|
EventObserver |
applicationCountObserver()
|
EventObserver |
collectChartDataObserver()
|
protected abstract void |
disconnectApplication(T application)
|
void |
exit()
Removes all applications and exits |
int |
getApplicationBatchSize()
|
int |
getApplicationCount()
|
int |
getLoginDelayFactor()
Sets the with which to multiply the think time when logging in, this helps spread the application logins when creating a batch of application. |
int |
getMaximumThinkTime()
|
org.jfree.data.xy.XYSeriesCollection |
getMemoryUsageDataset()
|
int |
getMinimumThinkTime()
|
EventObserver |
getMinimumThinkTimeObserver()
|
org.jfree.data.xy.XYSeriesCollection |
getNumberOfApplicationsDataset()
|
EventObserver |
getPauseObserver()
|
ItemRandomizer<LoadTest.UsageScenario> |
getScenarioChooser()
|
org.jfree.data.xy.YIntervalSeriesCollection |
getScenarioDurationDataset(String name)
|
protected int |
getThinkTime()
|
org.jfree.data.xy.XYSeriesCollection |
getThinkTimeDataset()
|
int |
getUpdateInterval()
|
LoadTest.UsageScenario<T> |
getUsageScenario(String usageScenarioName)
|
org.jfree.data.xy.XYSeriesCollection |
getUsageScenarioDataset()
|
org.jfree.data.xy.XYSeriesCollection |
getUsageScenarioFailureDataset()
|
Collection<String> |
getUsageScenarios()
|
User |
getUser()
|
int |
getWarningTime()
|
EventObserver |
getWarningTimeObserver()
|
protected abstract T |
initializeApplication()
|
boolean |
isCollectChartData()
|
boolean |
isPaused()
|
boolean |
isScenarioEnabled(String scenarioName)
|
EventObserver |
maximumThinkTimeObserver()
|
void |
removeApplicationBatch()
Removes one batch of applications. |
void |
resetChartData()
Resets the accumulated chart data |
protected void |
runScenario(String usageScenarioName,
T application)
Runs the scenario with the given name on the given application |
void |
setApplicationBatchSize(int applicationBatchSize)
|
void |
setCollectChartData(boolean value)
|
void |
setLoginDelayFactor(int loginDelayFactor)
Sets the with which to multiply the think time when logging in, this helps spread the application logins when creating a batch of application. |
void |
setMaximumThinkTime(int maximumThinkTime)
|
void |
setMinimumThinkTime(int minimumThinkTime)
|
void |
setPaused(boolean value)
|
void |
setScenarioEnabled(String scenarioName,
boolean value)
|
void |
setUpdateInterval(int updateInterval)
|
void |
setUser(User user)
|
void |
setWarningTime(int warningTime)
|
void |
setWeight(String scenarioName,
int weight)
Sets the random chooser weight for the given scenario |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_CHART_DATA_UPDATE_INTERVAL_MS
public static final int DEFAULT_WARNING_TIME_MS
protected static final org.slf4j.Logger LOG
protected static final Random RANDOM
Constructor Detail |
---|
public LoadTestModel(User user, int maximumThinkTime, int loginDelayFactor, int applicationBatchSize)
user
- the default user to use when initializing applicationsmaximumThinkTime
- the maximum think time, by default the minimum think time is max / 2loginDelayFactor
- the value with which to multiply the think time when delaying loginapplicationBatchSize
- the number of applications to add in a batchpublic LoadTestModel(User user, int maximumThinkTime, int loginDelayFactor, int applicationBatchSize, int warningTime)
user
- the default user to use when initializing applicationsmaximumThinkTime
- the maximum think time, by default the minimum think time is max / 2loginDelayFactor
- the value with which to multiply the think time when delaying loginapplicationBatchSize
- the number of applications to add in a batchwarningTime
- a work request is considered 'delayed' if the time it takes to process it exceeds this value (ms)public LoadTestModel(User user, Collection<? extends LoadTest.UsageScenario<T>> usageScenarios, int maximumThinkTime, int loginDelayFactor, int applicationBatchSize)
user
- the default user to use when initializing applicationsusageScenarios
- the usage scenarios to usemaximumThinkTime
- the maximum think time, by default the minimum think time is max / 2loginDelayFactor
- the value with which to multiply the think time when delaying loginapplicationBatchSize
- the number of applications to add in a batchpublic LoadTestModel(User user, Collection<? extends LoadTest.UsageScenario<T>> usageScenarios, int maximumThinkTime, int loginDelayFactor, int applicationBatchSize, int warningTime)
user
- the default user to use when initializing applicationsusageScenarios
- the usage scenarios to usemaximumThinkTime
- the maximum think time, by default the minimum think time is max / 2loginDelayFactor
- the value with which to multiply the think time when delaying loginapplicationBatchSize
- the number of applications to add in a batchwarningTime
- a work request is considered 'delayed' if the time it takes to process it exceeds this value (ms)Method Detail |
---|
public final User getUser()
getUser
in interface LoadTest
public final void setUser(User user)
setUser
in interface LoadTest
user
- the user to use when initializing new application instancespublic final LoadTest.UsageScenario<T> getUsageScenario(String usageScenarioName)
getUsageScenario
in interface LoadTest
usageScenarioName
- the scenario name
public final Collection<String> getUsageScenarios()
getUsageScenarios
in interface LoadTest
public final void setWeight(String scenarioName, int weight)
setWeight
in interface LoadTest
scenarioName
- the name of the scenarioweight
- the new weight to assign to the scenariopublic final boolean isScenarioEnabled(String scenarioName)
isScenarioEnabled
in interface LoadTest
scenarioName
- the scenario name
public final void setScenarioEnabled(String scenarioName, boolean value)
setScenarioEnabled
in interface LoadTest
scenarioName
- the scenario namevalue
- true if the scenario should be enabledpublic final ItemRandomizer<LoadTest.UsageScenario> getScenarioChooser()
getScenarioChooser
in interface LoadTest
public final org.jfree.data.xy.YIntervalSeriesCollection getScenarioDurationDataset(String name)
getScenarioDurationDataset
in interface LoadTest
name
-
public final org.jfree.data.xy.XYSeriesCollection getThinkTimeDataset()
getThinkTimeDataset
in interface LoadTest
public final org.jfree.data.xy.XYSeriesCollection getNumberOfApplicationsDataset()
getNumberOfApplicationsDataset
in interface LoadTest
public final org.jfree.data.xy.XYSeriesCollection getUsageScenarioDataset()
getUsageScenarioDataset
in interface LoadTest
public final org.jfree.data.xy.XYSeriesCollection getUsageScenarioFailureDataset()
getUsageScenarioFailureDataset
in interface LoadTest
public final org.jfree.data.xy.XYSeriesCollection getMemoryUsageDataset()
getMemoryUsageDataset
in interface LoadTest
public final void resetChartData()
resetChartData
in interface LoadTest
public final int getWarningTime()
getWarningTime
in interface LoadTest
public final void setWarningTime(int warningTime)
setWarningTime
in interface LoadTest
warningTime
- the the maximum time in milliseconds a work request has to finishpublic final int getUpdateInterval()
getUpdateInterval
in interface LoadTest
public final void setUpdateInterval(int updateInterval)
setUpdateInterval
in interface LoadTest
updateInterval
- the chart data update intervalpublic final int getApplicationCount()
getApplicationCount
in interface LoadTest
public final int getApplicationBatchSize()
getApplicationBatchSize
in interface LoadTest
public final void setApplicationBatchSize(int applicationBatchSize)
setApplicationBatchSize
in interface LoadTest
applicationBatchSize
- the number of applications to initialize per batchpublic final void addApplicationBatch()
addApplicationBatch
in interface LoadTest
LoadTest.setApplicationBatchSize(int)
public final void removeApplicationBatch()
removeApplicationBatch
in interface LoadTest
LoadTest.setApplicationBatchSize(int)
public final boolean isPaused()
isPaused
in interface LoadTest
public final void setPaused(boolean value)
setPaused
in interface LoadTest
value
- true if load testing should be pausedpublic final boolean isCollectChartData()
isCollectChartData
in interface LoadTest
public final void setCollectChartData(boolean value)
setCollectChartData
in interface LoadTest
value
- true if chart data should be collectedpublic final void exit()
exit
in interface LoadTest
public final int getMaximumThinkTime()
getMaximumThinkTime
in interface LoadTest
public final void setMaximumThinkTime(int maximumThinkTime)
setMaximumThinkTime
in interface LoadTest
maximumThinkTime
- the maximum number of milliseconds that should pass between work requestspublic final int getMinimumThinkTime()
getMinimumThinkTime
in interface LoadTest
public final void setMinimumThinkTime(int minimumThinkTime)
setMinimumThinkTime
in interface LoadTest
minimumThinkTime
- the minimum number of milliseconds that should pass between work requestspublic final int getLoginDelayFactor()
getLoginDelayFactor
in interface LoadTest
public final void setLoginDelayFactor(int loginDelayFactor)
setLoginDelayFactor
in interface LoadTest
loginDelayFactor
- the number with which to multiply the think time when logging inpublic final EventObserver applicationBatchSizeObserver()
applicationBatchSizeObserver
in interface LoadTest
public final EventObserver applicationCountObserver()
applicationCountObserver
in interface LoadTest
public final EventObserver maximumThinkTimeObserver()
maximumThinkTimeObserver
in interface LoadTest
public final EventObserver getMinimumThinkTimeObserver()
getMinimumThinkTimeObserver
in interface LoadTest
public final EventObserver getPauseObserver()
getPauseObserver
in interface LoadTest
public final EventObserver collectChartDataObserver()
collectChartDataObserver
in interface LoadTest
public final EventObserver getWarningTimeObserver()
getWarningTimeObserver
in interface LoadTest
protected final void runScenario(String usageScenarioName, T application) throws LoadTest.ScenarioException
usageScenarioName
- the name of the scenario to runapplication
- the application to use
ScenarioException
- in case of an exception
LoadTest.ScenarioException
protected void addExitListener(ActionListener listener)
listener
- a listener notified when this load test model has finished removing all applicationsprotected abstract T initializeApplication() throws CancelException
CancelException
- in case the initialization was cancelledprotected abstract void disconnectApplication(T application)
application
- the application to disconnectprotected final int getThinkTime()
setMinimumThinkTime(int)
,
setMaximumThinkTime(int)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |