[jboss-cvs] JBossCache/tests/perf/org/jboss/cache/manualtests ...

Manik Surtani msurtani at jboss.com
Fri Feb 2 12:01:16 EST 2007


  User: msurtani
  Date: 07/02/02 12:01:16

  Modified:    tests/perf/org/jboss/cache/manualtests 
                        LoopFlatteningTest.java
  Log:
  COnfigurable depths
  
  Revision  Changes    Path
  1.2       +17 -3     JBossCache/tests/perf/org/jboss/cache/manualtests/LoopFlatteningTest.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: LoopFlatteningTest.java
  ===================================================================
  RCS file: /cvsroot/jboss/JBossCache/tests/perf/org/jboss/cache/manualtests/LoopFlatteningTest.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- LoopFlatteningTest.java	2 Feb 2007 16:49:50 -0000	1.1
  +++ LoopFlatteningTest.java	2 Feb 2007 17:01:16 -0000	1.2
  @@ -10,7 +10,7 @@
      // number of nodes to create
      private final static int N = 10000;
      // tree depths to test with
  -   private final static int[] D = {3, 5, 10, 50};
  +   private static int[] D = {3, 5, 10, 20, 30};
   
      private final int depth;
      private Cache cache;
  @@ -18,7 +18,21 @@
   
      public static void main(String[] args)
      {
  -      System.out.println("Starting test.");
  +      if (args == null)
  +      {
  +         System.out.println("Using defaults of 3, 5, 10, 20, 30");
  +      }
  +      else
  +      {
  +         D = new int[args.length];
  +         for (int i = 0; i < args.length; i++)
  +         {
  +            D[i] = Integer.parseInt(args[i]);
  +         }
  +      }
  +
  +      System.out.println("Starting test, with " + N + " nodes evenly spread out across the tree.");
  +      System.out.println("All times in millis.");
         for (int depth : D)
         {
            System.out.println("Testing with depth " + depth);
  @@ -46,7 +60,7 @@
   
         startTime = System.currentTimeMillis();
         deleteNodes();
  -      System.out.println("Node Retrieval\t" + (System.currentTimeMillis() - startTime));
  +      System.out.println("Node Deletion\t" + (System.currentTimeMillis() - startTime));
   
         cache.stop();
      }
  
  
  



More information about the jboss-cvs-commits mailing list