Package mondrian.test
Class CacheHitTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.test.CacheHitTest
-
public class CacheHitTest extends FoodMartTestCase
TheCacheHitTest
class contains test suites that return hit ratio of aggregation cache for various sequences of MDX queries.This is not run as part of Main test suite as it only reports ratios for further investigations.
- Author:
- kvu
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
-
-
Field Summary
-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description CacheHitTest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearCache(java.lang.String cube)
Clears aggregation cachevoid
report(ServerInfo serverInfo)
Prints cache hit ratio.void
runRandomSuite(TestSuite suite, int n)
Loopsn
times, each time run a random test case in the testsuite
void
runTestSuiteInOrder(TestSuite suite, int numIter)
LoopsnumIte
times, each time run all child test suite in thesuite
void
testBigSetRandom()
Runs a set of bigger MDX queries that requires more memory and targets a bigger region of cache in random order.void
testSmallSetRandom()
Runs a set of small MDX queries that targets a small region of aggregation cache in random order.void
testSmallSetSequential()
Runs a set of small MDX queries that targets a small region of aggregation cache sequentially.void
testSmallSetVCRandom()
Runs a set of small MDX queries that targets a small region of aggregation cache in random order.void
testSmallSetVCSequential()
Runs a set of small MDX queries that targets a small region of aggregation cache sequentially.-
Methods inherited from class mondrian.test.FoodMartTestCase
allMember, assertAxisReturns, assertAxisThrows, assertBooleanExprReturns, assertExprReturns, assertExprThrows, assertQueriesReturnSimilarResults, assertQueryReturns, assertQueryThrows, assertSize, cubeByName, execute, executeExpr, executeQuery, executeSingletonAxis, genderMembersIncludingAll, getConnection, getDimensionWithName, getTestContext, isDefaultNullMemberRepresentation, isGroupingSetsSupported, member, productMembersPotScrubbersPotsAndPans, storeMembersCAAndOR, storeMembersUsaAndCanada, tearDown, verifySameNativeAndNot, warehouseMembersCanadaMexicoUsa
-
-
-
-
Method Detail
-
testSmallSetSequential
public void testSmallSetSequential() throws java.lang.Exception
Runs a set of small MDX queries that targets a small region of aggregation cache sequentially. All queries reference the relational Sales cube.- Throws:
java.lang.Exception
- on error
-
testSmallSetRandom
public void testSmallSetRandom() throws java.lang.Exception
Runs a set of small MDX queries that targets a small region of aggregation cache in random order. All queries reference the relational Sales cube.- Throws:
java.lang.Exception
- on error
-
testSmallSetVCSequential
public void testSmallSetVCSequential() throws java.lang.Exception
Runs a set of small MDX queries that targets a small region of aggregation cache sequentially. All queries reference the virtual Warehouse and Sales cube.- Throws:
java.lang.Exception
- on error
-
testSmallSetVCRandom
public void testSmallSetVCRandom() throws java.lang.Exception
Runs a set of small MDX queries that targets a small region of aggregation cache in random order. All queries reference the virtual Warehouse and Sales cube.- Throws:
java.lang.Exception
- on error
-
testBigSetRandom
public void testBigSetRandom() throws java.lang.Exception
Runs a set of bigger MDX queries that requires more memory and targets a bigger region of cache in random order. Queries reference to Sales cube as well as Warehouse and Sales cube.- Throws:
java.lang.Exception
- on error
-
runRandomSuite
public void runRandomSuite(TestSuite suite, int n) throws java.lang.Exception
Loopsn
times, each time run a random test case in the testsuite
- Parameters:
suite
- the suite of test casesn
- number of times- Throws:
java.lang.Exception
- on error
-
runTestSuiteInOrder
public void runTestSuiteInOrder(TestSuite suite, int numIter) throws java.lang.Exception
LoopsnumIte
times, each time run all child test suite in thesuite
- Parameters:
suite
- the suite of test suitesnumIter
- number of iterations- Throws:
java.lang.Exception
- on error
-
report
public void report(ServerInfo serverInfo)
Prints cache hit ratio.- Parameters:
serverInfo
- Server statistics
-
clearCache
public void clearCache(java.lang.String cube)
Clears aggregation cache- Parameters:
cube
- Cube name
-
-