org.jminor.common.db.tools
Class QueryLoadTestModel

java.lang.Object
  extended by org.jminor.common.model.LoadTestModel<QueryLoadTestModel.QueryApplication>
      extended by org.jminor.common.db.tools.QueryLoadTestModel
All Implemented Interfaces:
LoadTest

public final class QueryLoadTestModel
extends LoadTestModel<QueryLoadTestModel.QueryApplication>

A load test implementation for testing database queries.


Nested Class Summary
static class QueryLoadTestModel.QueryApplication
           
static class QueryLoadTestModel.QueryScenario
          A usage scenario based on a SQL query.
 
Nested classes/interfaces inherited from class org.jminor.common.model.LoadTestModel
LoadTestModel.AbstractUsageScenario<T>
 
Nested classes/interfaces inherited from interface org.jminor.common.model.LoadTest
LoadTest.ScenarioException, LoadTest.UsageScenario<T>
 
Field Summary
 
Fields inherited from class org.jminor.common.model.LoadTestModel
DEFAULT_CHART_DATA_UPDATE_INTERVAL_MS, DEFAULT_WARNING_TIME_MS, LOG, RANDOM
 
Constructor Summary
QueryLoadTestModel(Database database, User user, Collection<? extends QueryLoadTestModel.QueryScenario> scenarios)
          Instantiates a new QueryLoadTest.
 
Method Summary
protected  void disconnectApplication(QueryLoadTestModel.QueryApplication application)
           
 ConnectionPool getConnectionPool()
           
protected  QueryLoadTestModel.QueryApplication initializeApplication()
           
 
Methods inherited from class org.jminor.common.model.LoadTestModel
addApplicationBatch, addExitListener, applicationBatchSizeObserver, applicationCountObserver, collectChartDataObserver, exit, getApplicationBatchSize, getApplicationCount, getLoginDelayFactor, getMaximumThinkTime, getMemoryUsageDataset, getMinimumThinkTime, getMinimumThinkTimeObserver, getNumberOfApplicationsDataset, getPauseObserver, getScenarioChooser, getScenarioDurationDataset, getThinkTime, getThinkTimeDataset, getUpdateInterval, getUsageScenario, getUsageScenarioDataset, getUsageScenarioFailureDataset, getUsageScenarios, getUser, getWarningTime, getWarningTimeObserver, isCollectChartData, isPaused, isScenarioEnabled, maximumThinkTimeObserver, removeApplicationBatch, resetChartData, runScenario, setApplicationBatchSize, setCollectChartData, setLoginDelayFactor, setMaximumThinkTime, setMinimumThinkTime, setPaused, setScenarioEnabled, setUpdateInterval, setUser, setWarningTime, setWeight
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

QueryLoadTestModel

public QueryLoadTestModel(Database database,
                          User user,
                          Collection<? extends QueryLoadTestModel.QueryScenario> scenarios)
Instantiates a new QueryLoadTest.

Parameters:
database - the database
user - the user
scenarios - the query scenarios
Method Detail

getConnectionPool

public ConnectionPool getConnectionPool()
Returns:
the underlying connection pool

disconnectApplication

protected void disconnectApplication(QueryLoadTestModel.QueryApplication application)
Specified by:
disconnectApplication in class LoadTestModel<QueryLoadTestModel.QueryApplication>
Parameters:
application - the application to disconnect

initializeApplication

protected QueryLoadTestModel.QueryApplication initializeApplication()
                                                             throws CancelException
Specified by:
initializeApplication in class LoadTestModel<QueryLoadTestModel.QueryApplication>
Returns:
an initialized application.
Throws:
CancelException - in case the initialization was cancelled