Class QueryLoadTestModel.QueryScenario
java.lang.Object
is.codion.swing.common.model.tools.loadtest.AbstractUsageScenario<QueryLoadTestModel.QueryApplication>
is.codion.swing.common.model.tools.loadtest.QueryLoadTestModel.QueryScenario
- All Implemented Interfaces:
UsageScenario<QueryLoadTestModel.QueryApplication>
- Enclosing class:
- QueryLoadTestModel
public static class QueryLoadTestModel.QueryScenario
extends AbstractUsageScenario<QueryLoadTestModel.QueryApplication>
A usage scenario based on an SQL query.
-
Nested Class Summary
Nested classes/interfaces inherited from interface is.codion.swing.common.model.tools.loadtest.UsageScenario
UsageScenario.RunResult
-
Constructor Summary
ConstructorsConstructorDescriptionQueryScenario
(User user, String name, String query) Instantiates a new non-transactional QueryScenario.QueryScenario
(User user, String name, String query, boolean transactional) Instantiates a new QueryScenario. -
Method Summary
Modifier and TypeMethodDescriptionFor overriding, returns the parameter values to use for the next query execution, these must of course match the parameter slots in the underlying query.protected final void
perform
(QueryLoadTestModel.QueryApplication application) Runs a set of actions on the given application.Methods inherited from class is.codion.swing.common.model.tools.loadtest.AbstractUsageScenario
cleanup, clearExceptions, defaultWeight, equals, exceptions, hashCode, maximumTime, name, prepare, resetRunCount, run, successfulRunCount, toString, totalRunCount, unsuccessfulRunCount
-
Constructor Details
-
QueryScenario
Instantiates a new non-transactional QueryScenario.- Parameters:
user
- the username
- a unique name for the scenarioquery
- the query
-
QueryScenario
Instantiates a new QueryScenario.- Parameters:
user
- the username
- a unique name for the scenarioquery
- the querytransactional
- if true, commit and rollback is performed on success and error respectively
-
-
Method Details
-
perform
Description copied from class:AbstractUsageScenario
Runs a set of actions on the given application.- Specified by:
perform
in classAbstractUsageScenario<QueryLoadTestModel.QueryApplication>
- Parameters:
application
- the connection pool providing connections- Throws:
Exception
- in case of an exception during the scenario run
-
parameters
For overriding, returns the parameter values to use for the next query execution, these must of course match the parameter slots in the underlying query.- Returns:
- a list of parameters for the next query run
-