db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject cvs commit: db-ojb/xdocs performance.xml
Date Fri, 07 Feb 2003 20:06:17 GMT
arminw      2003/02/07 12:06:17

  Modified:    xdocs    performance.xml
  Log:
  update the documentation
  
  Revision  Changes    Path
  1.8       +71 -17    db-ojb/xdocs/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/xdocs/performance.xml,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- performance.xml	7 Feb 2003 10:58:35 -0000	1.7
  +++ performance.xml	7 Feb 2003 20:06:17 -0000	1.8
  @@ -103,12 +103,6 @@
   <br/>- Community support
   <br/>- The different licences of Open Source projects
   <br/>- etcetera ...
  -
  -
  -<font color="#ff0000"><i><b>
  -bla bla TODO
  -</b></i></font>
  -
   </p>
   
   </subsection>
  @@ -189,7 +183,7 @@
   supported API's (PB-api, ODMG-api, JDO-api) in a multithreaded environment.
   Running this test out of the box (a virgin OJB version) shouldn't cause any problems.
   To run the JDO-api test too, see <a href="tutorial4.html">JDO tutorial</a>
and comment in
  -the test in target <code>perf-test</code> in <code>build.xml</code>.
  +the test in target <code>perf-test</code> in <code>build.xml</code>
(<i>currently not implemented!</i>).
   </p>
   <p>
   Per default OJB use hsql as database, by changing the JdbcConnectionDescriptor
  @@ -208,7 +202,7 @@
   <source>
   [ojb] =================================================================
   [ojb]              OJB PERFORMANCE TEST SUMMARY
  -[ojb] 10 concurrent threads, handle 2000 articles per thread
  +[ojb] 10 concurrent threads, handle 2000 objects per thread
   [ojb]              - performance mode
   [ojb] =================================================================
   [ojb]           API  Test Period       Insert        Fetch       Delete
  @@ -234,6 +228,7 @@
   performance mode, <code>true</code> means run in stress mode
   (useful for developer to check stability).
   </p>
  +
   </subsection>
   
   
  @@ -241,32 +236,91 @@
   
   <subsection name="How OJB compares to other O/R mapping tools?" anchor="6">
   
  -<font color="#ff0000"><i><b>
  -TODO
  -</b></i></font>
  -
   <p>
   Many user ask this question and we don't know the answer. But OJB was
   shipped with a simple performance framework which allows a rudimentarily
  -comparision of the OJB with other (java-based) O/R mapping tools.
  +comparision of OJB with other (java-based) O/R mapping tools.
   <br/>
   Call <code>bin\build.bat perf-test-jar</code> or <code>bin/build.sh perf-test-jar</code>
  -to build the jar file contain all necessary classes.
  +to build the jar file contain all necessary classes to set up a test with an
  +arbitrary O/R mapper. After build the jar is in <code>/dist</code>.
  +</p>
  +<p>
  +<b>Steps to set up the test:</b>
  +<br/>
  +You could find a example implementation (test for the PB-/ODMG-api) called
  +<code>org.apache.ojb.broker.OJBPerfTest</code> in the test-sources directory.
  +<ul>
  +<li>Implement a class derived from <code>org.apache.ojb.performance.PerfTest</code></li>
  +<li>Implement a class derived from <code>org.apache.ojb.performance.PerfHandle</code></li>
  +<li>If the persistent objects of your mapping tool must be derived from a special
base
  +class or must be implement a special interface write a class by implementing
  +the <code>org.apache.ojb.performance.PerfArticle</code> interface and override
  +<code>newPerfArticle()</code> in your PerfHandle implementation class.
  +<br/>
  +Otherwise the test use a default implementation of this interface.</li>
  +</ul>
  +That's it!
  +</p>
  +
  +<p>
  +<b>Run the test</b>
  +<br/>
  +You have two possibilities to run the test:
  +<br/>
  +<br/>
  +a) Integration in the OJB build script
  +<br/>
  +Add the full qualified class name of your PerfTest implementation class
  +to the <code>perf-test</code> target of the OJB <code>build.xml</code>
  +file, add all necessary jar files to <code>[db-ojb]/lib</code>. The working
  +directory of the test is <code>[db-ojb]/target/test/ojb</code>.
  +
  +<br/>
  +<br/>
  +b) Run PerfMain
  +<br/>
  +It's possible to run the test using <code>org.apache.ojb.performance.PerfMain</code>.
  +<source>
  +java -classpath CLASSPATH org.apache.ojb.performance.PerfMain
  +
  +[comma separated list of PerfTest implementation classes, no blanks!]
  +
  +[number of test loops]
  +
  +[number of threads]
  +
  +[number of insert/fetch/delete loops per thread]
  +
  +[boolean - run in stress mode if set true,
  +run in performance mode if set false, default false]
  +
  +For example:
  +java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000 fale
  +</source>
  +
  +</p>
  +
  +<p>
  +<font color="#ff0000"><b>Please:</b></font>
  +<br/>Don't start flame wars by posting performance results to the
  +mailing lists made with this simple test. This test was created for
  +OJB QA and to give a clue how good or bad OJB performs. NOT to start
  +discussion like <i>XY is 12% faster then XZ</i>!!.
   </p>
  +
   </subsection>
   
   
   
   
  -<subsection name="Using OJB to write clean JDBC code" anchor="6">
  +<subsection name="Using OJB to write clean JDBC code" anchor="7">
   
   <font color="#ff0000"><i><b>
   TODO
   </b></i></font>
   
  -<p>
   
  -</p>
   </subsection>
   
   </section>
  
  
  

Mime
View raw message