|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
mondrian.test.ConcurrentValidatingQueryRunner
public class ConcurrentValidatingQueryRunner
Utility class to run set of MDX queries in multiple threads and validate the results. Queries are run against the FoodMart database.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary |
---|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Constructor Summary | |
---|---|
ConcurrentValidatingQueryRunner(int numSeconds,
boolean useRandomQuery,
boolean randomCacheFlush,
FoodMartTestCase.QueryAndResult[] queriesAndResults)
Runs concurrent queries with random cache flush. |
|
ConcurrentValidatingQueryRunner(int numSeconds,
boolean useRandomQuery,
FoodMartTestCase.QueryAndResult[] queriesAndResults)
Runs concurrent queries without flushing cache. |
Method Summary | |
---|---|
void |
run()
Runs a number of queries until time expires. |
(package private) static java.util.List<java.lang.Throwable> |
runTest(int numThreads,
int runTimeInSeconds,
boolean randomQueries,
boolean randomCacheFlush,
boolean printReport,
FoodMartTestCase.QueryAndResult[] queriesAndResults)
Creates and runs concurrent threads of tests with random cache flush. |
(package private) static java.util.List<java.lang.Throwable> |
runTest(int numThreads,
int runTimeInSeconds,
boolean randomQueries,
boolean printReport,
FoodMartTestCase.QueryAndResult[] queriesAndResults)
Creates and runs concurrent threads of tests without flushing cache. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ConcurrentValidatingQueryRunner(int numSeconds, boolean useRandomQuery, FoodMartTestCase.QueryAndResult[] queriesAndResults)
ConcurrentMdxTest
.
numSeconds
- Running timeuseRandomQuery
- If set to true
, the runner will
pick a random query from the set. If set to false
,
the runner will circle through queries sequentiallyqueriesAndResults
- The array of pairs of query and expected resultpublic ConcurrentValidatingQueryRunner(int numSeconds, boolean useRandomQuery, boolean randomCacheFlush, FoodMartTestCase.QueryAndResult[] queriesAndResults)
numSeconds
- Running timeuseRandomQuery
- If set to true
, the runner will
pick a random query from the set. If set to false
,
the runner will circle through queries sequentiallyrandomCacheFlush
- If set to true
, the runner will
do a coin toss before running the query. If the result of the
experiment is favorable, runner will flush a random region
of aggregation cachequeriesAndResults
- The array of pairs of query and expected resultMethod Detail |
---|
public void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
static java.util.List<java.lang.Throwable> runTest(int numThreads, int runTimeInSeconds, boolean randomQueries, boolean printReport, FoodMartTestCase.QueryAndResult[] queriesAndResults)
ConcurrentMdxTest
.
numThreads
- Number of concurrent threadsrunTimeInSeconds
- Running TimerandomQueries
- Whether to pick queries in random or in sequenceprintReport
- Whether to print reportqueriesAndResults
- Array of pairs of query and expected result
static java.util.List<java.lang.Throwable> runTest(int numThreads, int runTimeInSeconds, boolean randomQueries, boolean randomCacheFlush, boolean printReport, FoodMartTestCase.QueryAndResult[] queriesAndResults)
numThreads
- Number of concurrent threadsrunTimeInSeconds
- Running TimerandomQueries
- Whether to pick queries in random or in sequencerandomCacheFlush
- Whether to flush cache before running queriesprintReport
- Whether to print reportqueriesAndResults
- Array of pairs of query and expected result
|
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |