Skip to content

Commit

Permalink
MONDRIAN: Test case for Bug641- "Large NON EMPTY result performs poor…
Browse files Browse the repository at this point in the history
…ly with ResultStyle.ITERABLE"

[git-p4: depot-paths = "//open/mondrian/": change = 13127]
  • Loading branch information
Matt Campbell authored and Matt Campbell committed Oct 26, 2009
1 parent 63e63f5 commit b7030d6
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/main/mondrian/util/Bug.java
Expand Up @@ -142,6 +142,16 @@ public class Bug {
*/
public static final boolean BugMondrian584Fixed = false;


/**
* Whether
* <a href="http://jira.pentaho.com/browse/MONDRIAN-641">bug MONDRIAN-641,
* "Large NON EMPTY result performs poorly with ResultStyle.ITERABLE"</a>
*/
public static final boolean BugMondrian641Fixed = false;



/**
* Returns whether to avoid a test because the memory monitor may cause it
* to fail.
Expand Down
22 changes: 22 additions & 0 deletions testsrc/main/mondrian/test/PerformanceTest.java
Expand Up @@ -10,6 +10,7 @@
package mondrian.test;

import mondrian.olap.*;
import mondrian.util.Bug;

import java.util.*;

Expand Down Expand Up @@ -67,6 +68,27 @@ public void testBugMondrian550Tuple() {
assertEquals(3263, result2.getAxes()[1].getPositions().size());
}


/**
* Test case for
* <a href="http://jira.pentaho.com/browse/MONDRIAN-641">
* Bug MONDRIAN-641</a>, "Large NON EMPTY result performs poorly with
* ResultStyle.ITERABLE". Runs in ~10 seconds with ResultStyle.LIST,
* 99+ seconds with ITERABLE (on DELL Latitude D630).
*/
public void testBug641() {
if (Bug.BugMondrian641Fixed) {
long start = System.currentTimeMillis();
Result result = executeQuery(
"select non empty { crossjoin( customers.[city].members, "
+ "crossjoin( [store type].[store type].members, "
+ "product.[product name].members)) }"
+ " on 0 from sales");
printDuration("Bug ", start);
assertEquals(51148, result.getAxes()[0].getPositions().size());
}
}

private TestContext getBugMondrian550Schema() {
return TestContext.createSubstitutingCube(
"Sales",
Expand Down

0 comments on commit b7030d6

Please sign in to comment.