[jboss-cvs] JBossCache/tests-50/perf/org/jboss/cache/pojo/collection ...

Elias Ross genman at noderunner.net
Sun Nov 19 22:53:57 EST 2006


  User: genman  
  Date: 06/11/19 22:53:57

  Modified:    tests-50/perf/org/jboss/cache/pojo/collection 
                        CollectionPerfTest.java
  Log:
  JBCACHE-867, Move methods from the ProxyImpl to Node, refactor Node classes as well
  
  Revision  Changes    Path
  1.2       +13 -12    JBossCache/tests-50/perf/org/jboss/cache/pojo/collection/CollectionPerfTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: CollectionPerfTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests-50/perf/org/jboss/cache/pojo/collection/CollectionPerfTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- CollectionPerfTest.java	10 Nov 2006 05:19:04 -0000	1.1
  +++ CollectionPerfTest.java	20 Nov 2006 03:53:57 -0000	1.2
  @@ -20,6 +20,7 @@
   public class CollectionPerfTest extends TestCase
   {
      Log log_ = LogFactory.getLog(CollectionTest.class);
  +   static final int count = 1000;
   
      PojoCache cache_;
   
  @@ -94,18 +95,18 @@
            cacheList = (Collection) cache_.find("/language/list");
   
            long start = System.currentTimeMillis();
  -         collectionAdd(1000, jdkList);
  +         collectionAdd(count, jdkList);
            long jdkTime = System.currentTimeMillis() - start;
   
            start = System.currentTimeMillis();
  -         collectionAdd(1000, cacheList);
  +         collectionAdd(count, cacheList);
            long cacheTime = System.currentTimeMillis() - start;
            //assertTrue(label + " 1000 add performance, jdk time=" + jdkTime +", cache time=" + cacheTime, goodEnough(cacheTime,jdkTime));
  -         log_.info(label + " 1000 add performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
  +         log_.info(label + count + " add performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
         }
         catch (Exception e)
         {
  -         fail("testAddAll " + e.getMessage());
  +         // fail("testAddAll " + e.getMessage());
            throw e;
         }
      }
  @@ -118,14 +119,14 @@
            cacheList = (Map) cache_.find("/language/list");
   
            long start = System.currentTimeMillis();
  -         collectionAdd(1000, jdkList);
  +         collectionAdd(count, jdkList);
            long jdkTime = System.currentTimeMillis() - start;
   
            start = System.currentTimeMillis();
  -         collectionAdd(1000, cacheList);
  +         collectionAdd(count, cacheList);
            long cacheTime = System.currentTimeMillis() - start;
            //assertTrue(label + " 1000 add performance, jdk time=" + jdkTime +", cache time=" + cacheTime, goodEnough(cacheTime,jdkTime));
  -         log_.info(label + " 1000 add performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
  +         log_.info(label + count + " add performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
         }
         catch (Exception e)
         {
  @@ -139,8 +140,8 @@
         cache_.attach("/language/list", cacheList);
         cacheList = (Collection) cache_.find("/language/list");
   
  -      collectionAdd(1000, jdkList);
  -      collectionAdd(1000, cacheList);
  +      collectionAdd(count, jdkList);
  +      collectionAdd(count, cacheList);
   
         long start = System.currentTimeMillis();
         Iterator iter = jdkList.iterator();
  @@ -162,8 +163,8 @@
         cache_.attach("/language/list", cacheList);
         cacheList = (Map) cache_.find("/language/list");
   
  -      collectionAdd(1000, jdkList);
  -      collectionAdd(1000, cacheList);
  +      collectionAdd(count, jdkList);
  +      collectionAdd(count, cacheList);
   
         long start = System.currentTimeMillis();
         Iterator iter = jdkList.keySet().iterator();
  @@ -178,7 +179,7 @@
         long cacheTime = System.currentTimeMillis() - start;
   
         //assertTrue(label + " 1000 iter performance, jdk time=" + jdkTime +", cache time=" + cacheTime, goodEnough(cacheTime,jdkTime));
  -      log_.info(label + " 1000 iter performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
  +      log_.info(label + count + " iter performance, jdk time=" + jdkTime + ", cache time=" + cacheTime);
      }
   
      public void collectionAdd(int count, Collection c) throws Exception
  
  
  



More information about the jboss-cvs-commits mailing list