db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb build.xml
Date Sat, 27 Nov 2004 17:46:29 GMT
brj         2004/11/27 09:46:29

  Modified:    src/test/org/apache/ojb/broker PerformanceTest.java
                        PerformanceJdbcReferenceTest.java
               src/test/org/apache/ojb/otm PerformanceTest.java
               src/test/org/apache/ojb/odmg PerformanceTest.java
               .        build.xml
  Added:       src/test/org/apache/ojb/broker
                        CompareApiPerformanceTests.java
  Log:
  performance-target uses the new test-case CompareApiPerformanceTests
  
  Revision  Changes    Path
  1.14      +4 -5      db-ojb/src/test/org/apache/ojb/broker/PerformanceTest.java
  
  Index: PerformanceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PerformanceTest.java,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- PerformanceTest.java	14 Sep 2004 16:46:08 -0000	1.13
  +++ PerformanceTest.java	27 Nov 2004 17:46:28 -0000	1.14
  @@ -1,15 +1,14 @@
   package org.apache.ojb.broker;
   
  +import java.util.Iterator;
  +
   import org.apache.ojb.broker.query.Criteria;
   import org.apache.ojb.broker.query.Query;
   import org.apache.ojb.broker.query.QueryByCriteria;
  -import org.apache.ojb.broker.util.ObjectModificationDefaultImpl;
   import org.apache.ojb.broker.util.logging.Logger;
   import org.apache.ojb.broker.util.logging.LoggerFactory;
   import org.apache.ojb.junit.PBTestCase;
   
  -import java.util.Iterator;
  -
   /**
    * This TestCase contains the OJB performance benchmarks for the
    * PersistenceBroker API.
  @@ -21,12 +20,12 @@
       /**
        * the number of PerformanceArticle objects to work with.
        */
  -    static int articleCount = 10000;
  +    public static int articleCount = 10000;
   
       /**
        * the number of iterations to perform.
        */
  -    static int iterations = 2;
  +    public static int iterations = 2;
   
       /**
        * the offset value for PerformanceArticle primary keys
  
  
  
  1.17      +2 -2      db-ojb/src/test/org/apache/ojb/broker/PerformanceJdbcReferenceTest.java
  
  Index: PerformanceJdbcReferenceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/broker/PerformanceJdbcReferenceTest.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- PerformanceJdbcReferenceTest.java	14 Nov 2004 09:41:31 -0000	1.16
  +++ PerformanceJdbcReferenceTest.java	27 Nov 2004 17:46:28 -0000	1.17
  @@ -29,12 +29,12 @@
       /**
        * the number of PerformanceArticle objects to work with.
        */
  -    static int articleCount = 10000;
  +    public static int articleCount = 10000;
   
       /**
        * the number of iterations to perform.
        */
  -    static int iterations = 2;
  +    public static int iterations = 2;
   
       /**
        * the offset value for PerformanceArticle primary keys
  
  
  
  1.1                  db-ojb/src/test/org/apache/ojb/broker/CompareApiPerformanceTests.java
  
  Index: CompareApiPerformanceTests.java
  ===================================================================
  /*
   * Created on 27.11.2004
   *
   * To change the template for this generated file go to
   * Window>Preferences>Java>Code Generation>Code and Comments
   */
  package org.apache.ojb.broker;
  
  import junit.framework.Test;
  import junit.framework.TestSuite;
  
  /**
   * TestClass to Compare Performance of the APIs
   *
   * @author <a href="mailto:jbraeuchi@gmx.ch">Jakob Braeuchi</a>
   * @version $Id: CompareApiPerformanceTests.java,v 1.1 2004/11/27 17:46:28 brj Exp $
   */
  public class CompareApiPerformanceTests extends TestSuite
  {
      /**
       * the number of PerformanceArticle objects to work with.
       */
      static int articleCount = 10000;
  
      /**
       * the number of iterations to perform.
       */
      static int iterations = 2;
  
      public static void main(String[] args)
      {
          if (args.length > 0)
          {
              articleCount = Integer.parseInt(args[0]);
          }
          if (args.length > 1)
          {
              iterations = Integer.parseInt(args[1]);
          }
  
          String[] arr = {CompareApiPerformanceTests.class.getName()};
          junit.textui.TestRunner.main(arr);
      }
  
      public static Test suite()
      {
          TestSuite suite = new TestSuite();
          
          org.apache.ojb.broker.PerformanceTest.articleCount = articleCount;
          org.apache.ojb.broker.PerformanceTest.iterations = iterations;     
          suite.addTestSuite(org.apache.ojb.broker.PerformanceTest.class);
          
          org.apache.ojb.broker.PerformanceJdbcReferenceTest.articleCount = articleCount;
          org.apache.ojb.broker.PerformanceJdbcReferenceTest.iterations = iterations;
          suite.addTestSuite(org.apache.ojb.broker.PerformanceJdbcReferenceTest.class);
          
          org.apache.ojb.odmg.PerformanceTest.articleCount = articleCount;
          org.apache.ojb.odmg.PerformanceTest.iterations = iterations;
          suite.addTestSuite(org.apache.ojb.odmg.PerformanceTest.class);
          
          org.apache.ojb.otm.PerformanceTest.articleCount = articleCount;
          org.apache.ojb.otm.PerformanceTest.iterations = iterations;
          suite.addTestSuite(org.apache.ojb.otm.PerformanceTest.class);
          
          return suite;
      }    
  }
  
  
  
  1.6       +2 -2      db-ojb/src/test/org/apache/ojb/otm/PerformanceTest.java
  
  Index: PerformanceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/otm/PerformanceTest.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- PerformanceTest.java	11 Aug 2004 00:37:31 -0000	1.5
  +++ PerformanceTest.java	27 Nov 2004 17:46:29 -0000	1.6
  @@ -31,11 +31,11 @@
       /**
        * the number of PerformanceArticle objects to work with.
        */
  -    static int articleCount = 10000;
  +    public static int articleCount = 10000;
       /**
        * the number of iterations to perform.
        */
  -    static int iterations = 2;
  +    public static int iterations = 2;
       /**
        * the offset value for PerformanceArticle primary keys
        */
  
  
  
  1.12      +2 -2      db-ojb/src/test/org/apache/ojb/odmg/PerformanceTest.java
  
  Index: PerformanceTest.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/test/org/apache/ojb/odmg/PerformanceTest.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- PerformanceTest.java	11 Aug 2004 00:39:48 -0000	1.11
  +++ PerformanceTest.java	27 Nov 2004 17:46:29 -0000	1.12
  @@ -29,11 +29,11 @@
       /**
        * the number of PerformanceArticle objects to work with.
        */
  -    static int articleCount = 10000;
  +    public static int articleCount = 10000;
       /**
        * the number of iterations to perform.
        */
  -    static int iterations = 2;
  +    public static int iterations = 2;
       /**
        * the offset value for PerformanceArticle primary keys
        */
  
  
  
  1.157     +3 -31     db-ojb/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/build.xml,v
  retrieving revision 1.156
  retrieving revision 1.157
  diff -u -r1.156 -r1.157
  --- build.xml	24 Nov 2004 22:33:27 -0000	1.156
  +++ build.xml	27 Nov 2004 17:46:29 -0000	1.157
  @@ -1204,43 +1204,15 @@
       <target name="junit-quick" depends="prepare-repository, copy-testdb, junit-no-compile-no-prepare,junit-no-compile-no-prepare-selected"
/>
   
       <!-- ================================================================== -->
  -    <!-- Performance tests                                                  -->
  +    <!-- Performance tests, Compares the APIs                               -->
       <!-- ================================================================== -->
       <target name="performance" depends="prepare-repository, copy-testdb"
               description="Performance benchmark, compare the PB-api/ODMG-api
               with direct JDBC calls">
  -        <java fork="yes" classname="org.apache.ojb.broker.PerformanceTest"
  +        <java fork="yes" classname="org.apache.ojb.broker.CompareApiPerformanceTests"
                 dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
               <classpath refid="runtime-classpath"/>
               <arg value="2500"/>
  -            <arg value="3"/>
  -            <jvmarg value="-Xms128m"/>
  -            <jvmarg value="-Xmx256m"/>
  -        </java>
  -
  -        <java fork="yes" classname="org.apache.ojb.broker.PerformanceJdbcReferenceTest"
  -              dir="${build.test}/ojb" taskname="jdbc" failonerror="true" >
  -            <classpath refid="runtime-classpath"/>
  -            <arg value="2500"/>
  -            <arg value="3"/>
  -            <jvmarg value="-Xms128m"/>
  -            <jvmarg value="-Xmx256m"/>
  -            <!--jvmarg value="-Xrunhprof:cpu=times,file=perf.hprof.txt" /-->
  -        </java>
  -
  -        <java fork="yes" classname="org.apache.ojb.odmg.PerformanceTest"
  -              dir="${build.test}/ojb" taskname="odmg" failonerror="true" >
  -            <classpath refid="runtime-classpath"/>
  -            <arg value="500"/>
  -            <arg value="3"/>
  -            <jvmarg value="-Xms128m"/>
  -            <jvmarg value="-Xmx256m"/>
  -        </java>
  -
  -        <java fork="yes" classname="org.apache.ojb.otm.PerformanceTest"
  -              dir="${build.test}/ojb" taskname="otm" failonerror="true" >
  -            <classpath refid="runtime-classpath"/>
  -            <arg value="500"/>
               <arg value="3"/>
               <jvmarg value="-Xms128m"/>
               <jvmarg value="-Xmx256m"/>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message