You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@avalon.apache.org by bl...@apache.org on 2002/02/13 22:00:50 UTC
cvs commit: jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/pool/test MultiThreadedPoolComparisonProfile.java PoolComparisonProfileAbstract.java
bloritsch 02/02/13 13:00:49
Modified: src/scratchpad/org/apache/avalon/excalibur/pool/test
MultiThreadedPoolComparisonProfile.java
PoolComparisonProfileAbstract.java
Log:
make same changes to pool profile tests. We need to test on massively large numbers of threads
Revision Changes Path
1.4 +3 -3 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/pool/test/MultiThreadedPoolComparisonProfile.java
Index: MultiThreadedPoolComparisonProfile.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/pool/test/MultiThreadedPoolComparisonProfile.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MultiThreadedPoolComparisonProfile.java 12 Feb 2002 21:30:43 -0000 1.3
+++ MultiThreadedPoolComparisonProfile.java 13 Feb 2002 21:00:49 -0000 1.4
@@ -29,12 +29,12 @@
* given a single access thread.
*
* @author <a href="mailto:leif@silveregg.co.jp">Leif Mortenson</a>
- * @version $Id: MultiThreadedPoolComparisonProfile.java,v 1.3 2002/02/12 21:30:43 bloritsch Exp $
+ * @version $Id: MultiThreadedPoolComparisonProfile.java,v 1.4 2002/02/13 21:00:49 bloritsch Exp $
*/
public class MultiThreadedPoolComparisonProfile
extends PoolComparisonProfileAbstract
{
- protected static final int THREADS = 10;
+ protected static final int THREADS = 100;
private Object m_semaphore = new Object();
private int m_startedCount;
@@ -73,7 +73,7 @@
// Perform this threads part of the test.
final int cnt = gets / THREADS;
final Poolable[] poolTmp = new Poolable[cnt];
- final int loops = TEST_SIZE / gets;
+ final int loops = (TEST_SIZE / THREADS) / cnt;
for( int i = 0; i < loops; i++ )
{
// Get some Poolables
1.3 +45 -45 jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/pool/test/PoolComparisonProfileAbstract.java
Index: PoolComparisonProfileAbstract.java
===================================================================
RCS file: /home/cvs/jakarta-avalon-excalibur/src/scratchpad/org/apache/avalon/excalibur/pool/test/PoolComparisonProfileAbstract.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- PoolComparisonProfileAbstract.java 12 Feb 2002 21:30:43 -0000 1.2
+++ PoolComparisonProfileAbstract.java 13 Feb 2002 21:00:49 -0000 1.3
@@ -26,7 +26,7 @@
* Used as a basis for the PoolComparisonProfile Tests
*
* @author <a href="mailto:leif@silveregg.co.jp">Leif Mortenson</a>
- * @version $Id: PoolComparisonProfileAbstract.java,v 1.2 2002/02/12 21:30:43 bloritsch Exp $
+ * @version $Id: PoolComparisonProfileAbstract.java,v 1.3 2002/02/13 21:00:49 bloritsch Exp $
*/
public abstract class PoolComparisonProfileAbstract
extends TestCase
@@ -67,10 +67,10 @@
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are small objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_SmallPoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
throws Exception
{
String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_SmallPoolables";
@@ -78,7 +78,7 @@
Class poolableClass = SmallPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -91,25 +91,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/**
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 20 at a time,
+ * Test will use pools with a max size of 100, while getting up to 200 at a time,
* Poolables are small objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_SmallPoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_SmallPoolables()
throws Exception
{
- String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_SmallPoolables";
+ String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_SmallPoolables";
Class poolableClass = SmallPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -122,25 +122,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 20, factory );
+ generalTest( name, poolA, poolB, 200, factory );
}
/**
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are medium objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_MediumPoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables()
throws Exception
{
- String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_MediumPoolables";
+ String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables";
Class poolableClass = MediumPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -153,25 +153,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/**
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 20 at a time,
+ * Test will use pools with a max size of 100, while getting up to 200 at a time,
* Poolables are medium objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_MediumPoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_MediumPoolables()
throws Exception
{
- String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_MediumPoolables";
+ String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_MediumPoolables";
Class poolableClass = MediumPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -184,25 +184,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 20, factory );
+ generalTest( name, poolA, poolB, 200, factory );
}
/**
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are large objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_LargePoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
throws Exception
{
- String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_LargePoolables";
+ String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables";
Class poolableClass = LargePoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -215,25 +215,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/**
* Compare the SoftResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a SoftResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 20 at a time,
+ * Test will use pools with a max size of 100, while getting up to 200 at a time,
* Poolables are large objects.
*/
- public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_LargePoolables()
+ public void testCompare_SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_LargePoolables()
throws Exception
{
- String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets20_LargePoolables";
+ String name = "SoftResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets200_LargePoolables";
Class poolableClass = LargePoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = false;
boolean blocking = false;
long blockTimeout = 0;
@@ -246,7 +246,7 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 20, factory );
+ generalTest( name, poolA, poolB, 200, factory );
}
/*---------------------------------------------------------------
@@ -256,18 +256,18 @@
* Compare the HardResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a HardResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are small objects.
*/
- public void testCompare_HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_SmallPoolables()
+ public void testCompare_HardResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables()
throws Exception
{
- String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_SmallPoolables";
+ String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_SmallPoolables";
Class poolableClass = SmallPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = true;
boolean blocking = false;
long blockTimeout = 0;
@@ -280,25 +280,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/**
* Compare the HardResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a HardResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are medium objects.
*/
public void testCompare_HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_MediumPoolables()
throws Exception
{
- String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_MediumPoolables";
+ String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_MediumPoolables";
Class poolableClass = MediumPoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = true;
boolean blocking = false;
long blockTimeout = 0;
@@ -311,25 +311,25 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/**
* Compare the HardResourceLimitingPool and ResourceLimitingPool when the
* ResourceLimitingPool is configured to act like a HardResourceLimitingPool.
* <p>
- * Test will use pools with a max size of 10, while getting up to 10 at a time,
+ * Test will use pools with a max size of 100, while getting up to 100 at a time,
* Poolables are large objects.
*/
- public void testCompare_HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_LargePoolables()
+ public void testCompare_HardResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables()
throws Exception
{
- String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max10_Gets10_LargePoolables";
+ String name = "HardResourceLimitingPool_And_ResourceLimitingPool_Max100_Gets100_LargePoolables";
Class poolableClass = LargePoolable.class;
ObjectFactory factory = new ClassInstanceObjectFactory( poolableClass, m_poolLogger );
int min = 0;
- int max = 10;
+ int max = 100;
boolean maxStrict = true;
boolean blocking = false;
long blockTimeout = 0;
@@ -342,7 +342,7 @@
ResourceLimitingPool poolB = new ResourceLimitingPool( factory, max, maxStrict, blocking, blockTimeout, trimInterval );
poolB.enableLogging( m_poolLogger );
- generalTest( name, poolA, poolB, 10, factory );
+ generalTest( name, poolA, poolB, 100, factory );
}
/*---------------------------------------------------------------
@@ -363,7 +363,7 @@
public static class LargePoolable
implements Poolable
{
- int[][] a = new int[100][50];
+ int[][] a = new int[10][100];
}
/**
--
To unsubscribe, e-mail: <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>