Keel 2.1RC2

org.apache.excalibur.mpool.test
Class PoolComparisonProfileAbstract

java.lang.Object
  extended byjunit.framework.Assert
      extended byjunit.framework.TestCase
          extended byorg.apache.excalibur.mpool.test.PoolComparisonProfileAbstract
All Implemented Interfaces:
junit.framework.Test
Direct Known Subclasses:
MultiThreadedPoolComparisonProfile, SingleThreadedPoolComparisonProfile

public abstract class PoolComparisonProfileAbstract
extends junit.framework.TestCase

Used as a basis for the PoolComparisonProfile Tests

Version:
$Id: PoolComparisonProfileAbstract.java,v 1.4 2004/02/28 11:47:32 cziegeler Exp $
Author:

Nested Class Summary
static class PoolComparisonProfileAbstract.LargePoolable
           
static class PoolComparisonProfileAbstract.MediumPoolable
           
static class PoolComparisonProfileAbstract.NoPoolingPool
          Dummy class used for timing test cases where no pooling is done.
static class PoolComparisonProfileAbstract.SmallPoolable
           
 
Field Summary
protected  Logger m_logger
           
protected  Logger m_poolLogger
           
protected static int TEST_SIZE
          The TEST_SIZE defines the overall size of the tests.
 
Fields inherited from class junit.framework.TestCase
 
Constructor Summary
PoolComparisonProfileAbstract(java.lang.String name)
           
 
Method Summary
protected  void generalTest(java.lang.String name, Pool poolA, Pool poolB, int gets, ClassInstanceObjectFactory factory)
          The guts of the various test cases.
protected  void generalTest(java.lang.String name, Pool poolA, Pool poolB, int gets, ClassInstanceObjectFactory factory)
          The guts of the various test cases.
protected abstract  long getPoolRunTime(Pool pool, int gets)
           
protected abstract  long getPoolRunTime(Pool pool, int gets)
           
protected  java.lang.String getShortClassName(java.lang.Object o)
           
protected  void resetMemory()
           
 void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_LargePoolables()
          Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_MediumPoolables()
          Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_SmallPoolables()
          Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
          Compare the FixedSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
          Compare the FixedSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_LargePoolables()
          Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_MediumPoolables()
          Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.
 void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_SmallPoolables()
          Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_LargePoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_MediumPoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_SmallPoolables()
          Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.
 
Methods inherited from class junit.framework.TestCase
countTestCases, createResult, getName, name, run, run, runBare, runTest, setName, setUp, tearDown, toString
 
Methods inherited from class junit.framework.Assert
assert, assert, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertNotNull, assertNotNull, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TEST_SIZE

protected static final int TEST_SIZE
The TEST_SIZE defines the overall size of the tests. Decreasing this will decrease the time the test takes to run, but also decrease its efficiency.

See Also:
Constant Field Values

m_logger

protected Logger m_logger

m_poolLogger

protected Logger m_poolLogger
Constructor Detail

PoolComparisonProfileAbstract

public PoolComparisonProfileAbstract(java.lang.String name)
Method Detail

testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables

public void testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
                                                                                      throws java.lang.Exception
Compare the FixedSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are small objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_SmallPoolables

public void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_SmallPoolables()
                                                                                       throws java.lang.Exception
Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_MediumPoolables

public void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_MediumPoolables()
                                                                                        throws java.lang.Exception
Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_LargePoolables

public void testCompare_FixedSizePool_And_BlockingFixedSizePool_Max100_Gets100_LargePoolables()
                                                                                       throws java.lang.Exception
Compare the FixedSizePool and BlockingFixedSizePool when the BlockingFixedSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables

public void testCompare_FixedSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
                                                                                      throws java.lang.Exception
Compare the FixedSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are large objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_SmallPoolables

public void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_SmallPoolables()
                                                                                  throws java.lang.Exception
Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are small objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_MediumPoolables

public void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_MediumPoolables()
                                                                                   throws java.lang.Exception
Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_LargePoolables

public void testCompare_FixedSizePool_And_VariableSizePool_Max100_Gets100_LargePoolables()
                                                                                  throws java.lang.Exception
Compare the FixedSizePool and VariableSizePool when the VariableSizePool is configured to act like a FixedSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are large objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
                                                                                         throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are small objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_SmallPoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_SmallPoolables()
                                                                                         throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 200 at a time, Poolables are small objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables()
                                                                                          throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_MediumPoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_MediumPoolables()
                                                                                          throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 200 at a time, Poolables are medium objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
                                                                                         throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 100 at a time, Poolables are large objects.

Throws:
java.lang.Exception

testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_LargePoolables

public void testCompare_VariableSizePool_And_ResourceLimitingPool_Max100_Gets200_LargePoolables()
                                                                                         throws java.lang.Exception
Compare the VariableSizePool and ResourceLimitingPool when the ResourceLimitingPool is configured to act like a VariableSizePool.

Test will use pools with a max size of 100, while getting up to 200 at a time, Poolables are large objects.

Throws:
java.lang.Exception

resetMemory

protected void resetMemory()

getShortClassName

protected java.lang.String getShortClassName(java.lang.Object o)

getPoolRunTime

protected abstract long getPoolRunTime(Pool pool,
                                       int gets)
                                throws java.lang.Exception
Throws:
java.lang.Exception

getPoolRunTime

protected abstract long getPoolRunTime(Pool pool,
                                       int gets)
                                throws java.lang.Exception
Throws:
java.lang.Exception

generalTest

protected void generalTest(java.lang.String name,
                           Pool poolA,
                           Pool poolB,
                           int gets,
                           ClassInstanceObjectFactory factory)
                    throws java.lang.Exception
The guts of the various test cases. Will dispose the pools

Throws:
java.lang.Exception

generalTest

protected void generalTest(java.lang.String name,
                           Pool poolA,
                           Pool poolB,
                           int gets,
                           ClassInstanceObjectFactory factory)
                    throws java.lang.Exception
The guts of the various test cases. Will dispose the pools

Throws:
java.lang.Exception

Keel 2.1RC2

Please see keelframework.org for information about new Keel releases.