Package mondrian.util
Class MemoryMonitorTest
- java.lang.Object
-
- TestCase
-
- mondrian.test.FoodMartTestCase
-
- mondrian.util.MemoryMonitorTest
-
public class MemoryMonitorTest extends FoodMartTestCase
Test case forObjectPool.- Author:
- Richard Emberson
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classMemoryMonitorTest.TestMMstatic classMemoryMonitorTest.TestMM2
-
Field Summary
Fields Modifier and Type Field Description protected booleanenabled(package private) static intPERCENT_100-
Fields inherited from class mondrian.test.FoodMartTestCase
propSaver
-
-
Constructor Summary
Constructors Constructor Description MemoryMonitorTest()MemoryMonitorTest(String name)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void_testQuery()Run this by itself and it works across 2 orders of magnitude.booleancauseGC(MemoryMonitor mm)Get the difference between the maximum memory and the used memory and divide that by 1000.protected static intconvertThresholdToPercentage(long threshold, long maxMemory)protected voidsetUp()protected voidtearDown()voidtestDeltaUsage()-
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, verifySameNativeAndNot, warehouseMembersCanadaMexicoUsa
-
-
-
-
Field Detail
-
PERCENT_100
static final int PERCENT_100
- See Also:
- Constant Field Values
-
enabled
protected boolean enabled
-
-
Constructor Detail
-
MemoryMonitorTest
public MemoryMonitorTest()
-
MemoryMonitorTest
public MemoryMonitorTest(String name)
-
-
Method Detail
-
convertThresholdToPercentage
protected static int convertThresholdToPercentage(long threshold, long maxMemory)
-
causeGC
public boolean causeGC(MemoryMonitor mm)
Get the difference between the maximum memory and the used memory and divide that by 1000. This is the size of allocation chunks. Keep allocating chunks until anOutOfMemoryErroris created.
-
tearDown
protected void tearDown() throws Exception- Overrides:
tearDownin classFoodMartTestCase- Throws:
Exception
-
-