org.jminor.common.model
Interface LoadTest

All Known Implementing Classes:
EntityLoadTestModel, LoadTestModel, QueryLoadTestModel

public interface LoadTest

Specifies a class for running multiple application instances for load testing purposes.


Nested Class Summary
static class LoadTest.ScenarioException
          An exception originating from a scenario run
static interface LoadTest.UsageScenario<T>
          Specifies a load test usage scenario.
 
Method Summary
 void addApplicationBatch()
          Adds a batch of applications.
 EventObserver applicationBatchSizeObserver()
           
 EventObserver applicationCountObserver()
           
 EventObserver collectChartDataObserver()
           
 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.XYDataset getMemoryUsageDataset()
           
 int getMinimumThinkTime()
           
 EventObserver getMinimumThinkTimeObserver()
           
 org.jfree.data.xy.XYDataset getNumberOfApplicationsDataset()
           
 EventObserver getPauseObserver()
           
 ItemRandomizer<LoadTest.UsageScenario> getScenarioChooser()
           
 org.jfree.data.xy.YIntervalSeriesCollection getScenarioDurationDataset(String name)
           
 org.jfree.data.xy.XYDataset getThinkTimeDataset()
           
 int getUpdateInterval()
           
 LoadTest.UsageScenario getUsageScenario(String usageScenarioName)
           
 org.jfree.data.xy.XYDataset getUsageScenarioDataset()
           
 org.jfree.data.xy.XYDataset getUsageScenarioFailureDataset()
           
 Collection<String> getUsageScenarios()
           
 User getUser()
           
 int getWarningTime()
           
 EventObserver getWarningTimeObserver()
           
 boolean isCollectChartData()
           
 boolean isPaused()
           
 boolean isScenarioEnabled(String scenarioName)
           
 EventObserver maximumThinkTimeObserver()
           
 void removeApplicationBatch()
          Removes one batch of applications.
 void resetChartData()
          Resets the accumulated chart data
 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
 

Method Detail

exit

void exit()
Removes all applications and exits


getUser

User getUser()
Returns:
the user to use when initializing new application instances

setUser

void setUser(User user)
Parameters:
user - the user to use when initializing new application instances

setWeight

void setWeight(String scenarioName,
               int weight)
Sets the random chooser weight for the given scenario

Parameters:
scenarioName - the name of the scenario
weight - the new weight to assign to the scenario

isScenarioEnabled

boolean isScenarioEnabled(String scenarioName)
Parameters:
scenarioName - the scenario name
Returns:
true if the scenario is enabled

setScenarioEnabled

void setScenarioEnabled(String scenarioName,
                        boolean value)
Parameters:
scenarioName - the scenario name
value - true if the scenario should be enabled

getUsageScenarios

Collection<String> getUsageScenarios()
Returns:
the usage scenarios used by this load test;

getUsageScenario

LoadTest.UsageScenario getUsageScenario(String usageScenarioName)
Parameters:
usageScenarioName - the scenario name
Returns:
the usage scenario

getWarningTime

int getWarningTime()
Returns:
the the maximum time in milliseconds a work request has to finish

setWarningTime

void setWarningTime(int warningTime)
Parameters:
warningTime - the the maximum time in milliseconds a work request has to finish

getUpdateInterval

int getUpdateInterval()
Returns:
the chart data update interval

setUpdateInterval

void setUpdateInterval(int updateInterval)
Parameters:
updateInterval - the chart data update interval

getApplicationCount

int getApplicationCount()
Returns:
the number of active applications

getApplicationBatchSize

int getApplicationBatchSize()
Returns:
the number of applications to initialize per batch

setApplicationBatchSize

void setApplicationBatchSize(int applicationBatchSize)
Parameters:
applicationBatchSize - the number of applications to initialize per batch

isPaused

boolean isPaused()
Returns:
true if the load testing is paused

setPaused

void setPaused(boolean value)
Parameters:
value - true if load testing should be paused

getMaximumThinkTime

int getMaximumThinkTime()
Returns:
the maximum number of milliseconds that should pass between work requests

setMaximumThinkTime

void setMaximumThinkTime(int maximumThinkTime)
Parameters:
maximumThinkTime - the maximum number of milliseconds that should pass between work requests

getMinimumThinkTime

int getMinimumThinkTime()
Returns:
the minimum number of milliseconds that should pass between work requests

setMinimumThinkTime

void setMinimumThinkTime(int minimumThinkTime)
Parameters:
minimumThinkTime - the minimum number of milliseconds that should pass between work requests

getLoginDelayFactor

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.

Returns:
the number with which to multiply the think time when logging in

setLoginDelayFactor

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.

Parameters:
loginDelayFactor - the number with which to multiply the think time when logging in

isCollectChartData

boolean isCollectChartData()
Returns:
true if chart data is being collected

setCollectChartData

void setCollectChartData(boolean value)
Parameters:
value - true if chart data should be collected

applicationCountObserver

EventObserver applicationCountObserver()
Returns:
an observer notified each time the application count changes

applicationBatchSizeObserver

EventObserver applicationBatchSizeObserver()
Returns:
an observer notified each time the application batch size changes

addApplicationBatch

void addApplicationBatch()
Adds a batch of applications.

See Also:
setApplicationBatchSize(int)

removeApplicationBatch

void removeApplicationBatch()
Removes one batch of applications.

See Also:
setApplicationBatchSize(int)

resetChartData

void resetChartData()
Resets the accumulated chart data


collectChartDataObserver

EventObserver collectChartDataObserver()
Returns:
an observer notified each time the collect chart data state changes

getScenarioDurationDataset

org.jfree.data.xy.YIntervalSeriesCollection getScenarioDurationDataset(String name)
Parameters:
name - the scenario name
Returns:
a dataset plotting the average scenario duration

getThinkTimeDataset

org.jfree.data.xy.XYDataset getThinkTimeDataset()
Returns:
a dataset plotting the think time

getNumberOfApplicationsDataset

org.jfree.data.xy.XYDataset getNumberOfApplicationsDataset()
Returns:
a dataset plotting the number of active applications

getUsageScenarioDataset

org.jfree.data.xy.XYDataset getUsageScenarioDataset()
Returns:
a dataset plotting the number of runs each usage scenario is being run per second

getMemoryUsageDataset

org.jfree.data.xy.XYDataset getMemoryUsageDataset()
Returns:
a dataset plotting the memory usage of this load test model

getUsageScenarioFailureDataset

org.jfree.data.xy.XYDataset getUsageScenarioFailureDataset()
Returns:
a dataset plotting the failure rate of each usage scenario

maximumThinkTimeObserver

EventObserver maximumThinkTimeObserver()
Returns:
an observer notified each time the maximum think time changes

getMinimumThinkTimeObserver

EventObserver getMinimumThinkTimeObserver()
Returns:
an observer notified each time the minimum think time changes

getWarningTimeObserver

EventObserver getWarningTimeObserver()
Returns:
an observer notified each time the warning time changes

getPauseObserver

EventObserver getPauseObserver()
Returns:
an observer notified each time the paused state changes

getScenarioChooser

ItemRandomizer<LoadTest.UsageScenario> getScenarioChooser()
Returns:
the randomizer used to select scenarios