Package mondrian.test
Class PerformanceTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.test.PerformanceTest
-
public class PerformanceTest extends FoodMartTestCase
Various unit tests concerned with performance.- Since:
- August 7, 2006
- Author:
- jhyde
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPerformanceTest.CounterUdfUser-defined function that counts how many times it has been invoked.(package private) static classPerformanceTest.StatisticianCollects statistics for a test that is run multiple times.-
Nested classes/interfaces inherited from class mondrian.test.FoodMartTestCase
FoodMartTestCase.QueryAndResult
-
-
Field Summary
Fields Modifier and Type Field Description static org.apache.log4j.LoggerLOGGERCertain tests are enabled only if logging is enabled at debug level or higher.-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description PerformanceTest(String name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidtestBigResultsWithBigSchemaPerforms()Tests performance of a larger schema with a large number of result cells.voidtestBugMondrian1242()voidtestBugMondrian550()voidtestBugMondrian550Tuple()AstestBugMondrian550()but with tuples on the rows axis.voidtestBugMondrian639()voidtestBugMondrian843()Test case for Bug MONDRIAN-843, where Filter is inefficient.voidtestBugMondrian981()voidtestInMemoryCalc()Runs a query that performs a lot of in-memory calculation.voidtestMondrianBug641()Test case for Bug MONDRIAN-641, "Large NON EMPTY result performs poorly with ResultStyle.ITERABLE".voidtestStablePartialSort()Tests performance ofFunUtil.stablePartialSort(java.util.List<T>, java.util.Comparator<T>, int).voidtestVeryLargeExplicitSet()Tests performance when an MDX query contains a very large explicit set.-
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
-
-
-
-
Constructor Detail
-
PerformanceTest
public PerformanceTest(String name)
-
-
Method Detail
-
testBugMondrian550
public void testBugMondrian550()
-
testBugMondrian550Tuple
public void testBugMondrian550Tuple()
AstestBugMondrian550()but with tuples on the rows axis.
-
testMondrianBug641
public void testMondrianBug641()
Test case for Bug MONDRIAN-641, "Large NON EMPTY result performs poorly with ResultStyle.ITERABLE". Runs in ~10 seconds with ResultStyle.LIST, 99+ seconds with ITERABLE (on DELL Latitude D630).
-
testVeryLargeExplicitSet
public void testVeryLargeExplicitSet()
Tests performance when an MDX query contains a very large explicit set.
-
testBugMondrian639
public void testBugMondrian639()
-
testBigResultsWithBigSchemaPerforms
public void testBigResultsWithBigSchemaPerforms()
Tests performance of a larger schema with a large number of result cells. Runs in 186 seconds without nonAllPositions array in RolapEvaluator. Runs in 14 seconds when RolapEvaluator.getProperty uses getNonAllMembers. The performance boost gets more significant as the schema size grows.
-
testInMemoryCalc
public void testInMemoryCalc()
Runs a query that performs a lot of in-memory calculation.Timings (branch / change / host / DBMS / jdk / timings (s) / mean):
- mondrian-3.2 13366 marmalade oracle jdk1.6 592 588 581 571 avg 583
- mondrian-3.2 13367 marmalade oracle jdk1.6 643 620 631 671 avg 641
- mondrian-3.2 13397 marmalade oracle jdk1.6 604 626
- mondrian-3.2 13467 marmalade oracle jdk1.6 610 574
- mondrian-3.2 13489 marmalade oracle jdk1.6 565 561 579 596 avg 575
- mondrian-3.2 13490 marmalade oracle jdk1.6 607 611 581 605 avg 601
- mondrian-3.2 xxxxx marmalade oracle jdk1.6 562 583 541 522 avg 552
- mondrian-3.2 14036 marmalade oracle jdk1.6 451 433
- mondrian 14036 marmalade oracle jdk1.6 598 552
- mondrian 14037 marmalade oracle jdk1.6 626 596
- mondrian 14052 marmalade oracle jdk1.6 454
- mondrian 14770 marmite mysql jdk1.7 > 30 minutes
-
testBugMondrian843
public void testBugMondrian843()
Test case for Bug MONDRIAN-843, where Filter is inefficient.
-
testBugMondrian981
public void testBugMondrian981()
-
testBugMondrian1242
public void testBugMondrian1242()
Test for MONDRIAN-1242, "Slicer size is exponentially inflating the cell requests". This case just checks correctness; a similar case inPerformanceTestchecks performance.
-
testStablePartialSort
public void testStablePartialSort()
Tests performance ofFunUtil.stablePartialSort(java.util.List<T>, java.util.Comparator<T>, int)."Pedro's algorithm" was supplied as MONDRIAN-1288, "Optimize stable partial sort when dataset is huge and limit is small".
Parameters: N (number of elements in list), L (limit; number of elements to return)
Conclusions:
- Array sort is better when L is almost as large as N
- If L is small, Pedro's algorithm is best; but it grows with O(L^2) and is unusable for L > 10,000
- If L is less than N / 20, Julian's algorithm is best
- For L larger than N / 20, array sort is best
- Each algorithm improves number of comparisons: Julian's algorithm is the best, with N + L log L + comparisons
-
-