org.jminor.common.server.loadtest
Interface RemoteLoadTest

All Superinterfaces:
Remote

public interface RemoteLoadTest
extends Remote


Method Summary
 void addApplicationBatch()
          Adds a batch of applications.
 void addItem(Object item)
          Adds the given item to this model with default weight of 0.
 void addItem(Object item, int weight)
          Adds the given item to this model with the given weight value.
 void decrementWeight(Object item)
          Decrements the weight of the given item by one
 void exit()
          Removes all applications and exits
 int getApplicationBatchSize()
           
 int getApplicationCount()
           
 int getItemCount()
           
 Collection<ItemRandomizer.RandomItem<LoadTest.UsageScenario>> getItems()
           
 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()
           
 org.jfree.data.xy.XYDataset getNumberOfApplicationsDataset()
           
 LoadTest.UsageScenario getRandomItem()
          Fetches a random item from this model based on the item weights.
 org.jfree.data.xy.YIntervalSeriesCollection getScenarioDurationDataset(String name)
           
 org.jfree.data.xy.XYDataset getThinkTimeDataset()
           
 int getUpdateInterval()
           
 LoadTest.UsageScenario getUsageScenario(String scenarioName)
           
 org.jfree.data.xy.XYDataset getUsageScenarioDataset()
           
 org.jfree.data.xy.XYDataset getUsageScenarioFailureDataset()
           
 Collection<String> getUsageScenarios()
           
 User getUser()
           
 int getWarningTime()
           
 int getWeight(Object item)
          Returns the weight of the given item.
 double getWeightRatio(Object item)
          Returns this items share in the total weights as a floating point number between 0 and 1
 void incrementWeight(Object item)
          Increments the weight of the given item by one
 boolean isCollectChartData()
           
 boolean isPaused()
           
 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 setUpdateInterval(int updateInterval)
           
 void setUser(User user)
           
 void setWarningTime(int warningTime)
           
 void setWeight(Object item, int weight)
          Sets the weight of the given item
 

Method Detail

exit

void exit()
          throws RemoteException
Removes all applications and exits

Throws:
RemoteException - in case of a remote exception

getUser

User getUser()
             throws RemoteException
Returns:
the user to use when initializing new application instances
Throws:
RemoteException - in case of a remote exception

setUser

void setUser(User user)
             throws RemoteException
Parameters:
user - the user to use when initializing new application instances
Throws:
RemoteException - in case of a remote exception

getUsageScenario

LoadTest.UsageScenario getUsageScenario(String scenarioName)
                                        throws RemoteException
Parameters:
scenarioName - the name of the usage scenario to fetch
Returns:
the usage scenario with the given name
Throws:
RuntimeException - if no such scenario exists
RemoteException - in case of a remote exception

getUsageScenarios

Collection<String> getUsageScenarios()
                                     throws RemoteException
Returns:
the usage scenarios used by this load test
Throws:
RemoteException - in case of a remote exception

getWarningTime

int getWarningTime()
                   throws RemoteException
Returns:
the the maximum time in milliseconds a work request has to finish
Throws:
RemoteException - in case of a remote exception

setWarningTime

void setWarningTime(int warningTime)
                    throws RemoteException
Parameters:
warningTime - the the maximum time in milliseconds a work request has to finish
Throws:
RemoteException - in case of a remote exception

getUpdateInterval

int getUpdateInterval()
                      throws RemoteException
Returns:
the chart data update interval
Throws:
RemoteException - in case of a remote exception

setUpdateInterval

void setUpdateInterval(int updateInterval)
                       throws RemoteException
Parameters:
updateInterval - the chart data update interval
Throws:
RemoteException - in case of a remote exception

getApplicationCount

int getApplicationCount()
                        throws RemoteException
Returns:
the number of active applications
Throws:
RemoteException - in case of a remote exception

getApplicationBatchSize

int getApplicationBatchSize()
                            throws RemoteException
Returns:
the number of applications to initialize per batch
Throws:
RemoteException - in case of a remote exception

setApplicationBatchSize

void setApplicationBatchSize(int applicationBatchSize)
                             throws RemoteException
Parameters:
applicationBatchSize - the number of applications to initialize per batch
Throws:
RemoteException - in case of a remote exception

isPaused

boolean isPaused()
                 throws RemoteException
Returns:
true if the load testing is paused
Throws:
RemoteException - in case of a remote exception

setPaused

void setPaused(boolean value)
               throws RemoteException
Parameters:
value - true if load testing should be paused
Throws:
RemoteException - in case of a remote exception

getMaximumThinkTime

int getMaximumThinkTime()
                        throws RemoteException
Returns:
the maximum number of milliseconds that should pass between work requests
Throws:
RemoteException - in case of a remote exception

setMaximumThinkTime

void setMaximumThinkTime(int maximumThinkTime)
                         throws RemoteException
Parameters:
maximumThinkTime - the maximum number of milliseconds that should pass between work requests
Throws:
RemoteException - in case of a remote exception

getMinimumThinkTime

int getMinimumThinkTime()
                        throws RemoteException
Returns:
the minimum number of milliseconds that should pass between work requests
Throws:
RemoteException - in case of a remote exception

setMinimumThinkTime

void setMinimumThinkTime(int minimumThinkTime)
                         throws RemoteException
Parameters:
minimumThinkTime - the minimum number of milliseconds that should pass between work requests
Throws:
RemoteException - in case of a remote exception

getLoginDelayFactor

int getLoginDelayFactor()
                        throws RemoteException
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
Throws:
RemoteException - in case of a remote exception

setLoginDelayFactor

void setLoginDelayFactor(int loginDelayFactor)
                         throws RemoteException
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
Throws:
RemoteException - in case of a remote exception

isCollectChartData

boolean isCollectChartData()
                           throws RemoteException
Returns:
true if chart data is being collected
Throws:
RemoteException - in case of a remote exception

setCollectChartData

void setCollectChartData(boolean value)
                         throws RemoteException
Parameters:
value - true if chart data should be collected
Throws:
RemoteException - in case of a remote exception

addApplicationBatch

void addApplicationBatch()
                         throws RemoteException
Adds a batch of applications.

Throws:
RemoteException - in case of a remote exception
See Also:
setApplicationBatchSize(int)

removeApplicationBatch

void removeApplicationBatch()
                            throws RemoteException
Removes one batch of applications.

Throws:
RemoteException - in case of a remote exception
See Also:
setApplicationBatchSize(int)

resetChartData

void resetChartData()
                    throws RemoteException
Resets the accumulated chart data

Throws:
RemoteException - in case of a remote exception

getScenarioDurationDataset

org.jfree.data.xy.YIntervalSeriesCollection getScenarioDurationDataset(String name)
                                                                       throws RemoteException
Parameters:
name - the scenario name
Returns:
a dataset plotting the average scenario duration
Throws:
RemoteException - in case of a remote exception

getThinkTimeDataset

org.jfree.data.xy.XYDataset getThinkTimeDataset()
                                                throws RemoteException
Returns:
a dataset plotting the think time
Throws:
RemoteException - in case of a remote exception

getNumberOfApplicationsDataset

org.jfree.data.xy.XYDataset getNumberOfApplicationsDataset()
                                                           throws RemoteException
Returns:
a dataset plotting the number of active applications
Throws:
RemoteException - in case of a remote exception

getUsageScenarioDataset

org.jfree.data.xy.XYDataset getUsageScenarioDataset()
                                                    throws RemoteException
Returns:
a dataset plotting the number of runs each usage scenario is being run per second
Throws:
RemoteException - in case of a remote exception

getMemoryUsageDataset

org.jfree.data.xy.XYDataset getMemoryUsageDataset()
                                                  throws RemoteException
Returns:
a dataset plotting the memory usage of this load test model
Throws:
RemoteException - in case of a remote exception

getUsageScenarioFailureDataset

org.jfree.data.xy.XYDataset getUsageScenarioFailureDataset()
                                                           throws RemoteException
Returns:
a dataset plotting the failure rate of each usage scenario
Throws:
RemoteException - in case of a remote exception

getItemCount

int getItemCount()
                 throws RemoteException
Returns:
the number of items in this model.
Throws:
RemoteException - in case of a remote exception

getItems

Collection<ItemRandomizer.RandomItem<LoadTest.UsageScenario>> getItems()
                                                                       throws RemoteException
Returns:
the items in this model.
Throws:
RemoteException - in case of a remote exception

getWeight

int getWeight(Object item)
              throws RemoteException
Returns the weight of the given item.

Parameters:
item - the item
Returns:
the item weight
Throws:
RemoteException - in case of a remote exception

setWeight

void setWeight(Object item,
               int weight)
               throws RemoteException
Sets the weight of the given item

Parameters:
item - the item
weight - the value
Throws:
RemoteException - in case of a remote exception

addItem

void addItem(Object item)
             throws RemoteException
Adds the given item to this model with default weight of 0.

Parameters:
item - the item to add
Throws:
RemoteException - in case of a remote exception

addItem

void addItem(Object item,
             int weight)
             throws RemoteException
Adds the given item to this model with the given weight value.

Parameters:
item - the item to add
weight - the initial weight to assign to the item
Throws:
RemoteException - in case of a remote exception

getRandomItem

LoadTest.UsageScenario getRandomItem()
                                     throws RemoteException
Fetches a random item from this model based on the item weights.

Returns:
a randomly chosen item.
Throws:
RemoteException - in case of a remote exception

getWeightRatio

double getWeightRatio(Object item)
                      throws RemoteException
Returns this items share in the total weights as a floating point number between 0 and 1

Parameters:
item - the item
Returns:
the ratio of the total weights held by the given item
Throws:
RemoteException - in case of a remote exception

incrementWeight

void incrementWeight(Object item)
                     throws RemoteException
Increments the weight of the given item by one

Parameters:
item - the item
Throws:
RemoteException - in case of a remote exception

decrementWeight

void decrementWeight(Object item)
                     throws RemoteException
Decrements the weight of the given item by one

Parameters:
item - the item
Throws:
IllegalStateException - in case the weight is 0
RemoteException - in case of a remote exception