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/forrest/src/documentation/content/xdocs site.xml
Date Mon, 14 Jun 2004 14:18:56 GMT
arminw      2004/06/14 07:18:56

  Modified:    forrest/src/documentation/content/xdocs/docu performance.xml
               forrest/src/documentation/content/xdocs site.xml
  Log:
  minor changes on 'performance' doc
  
  Revision  Changes    Path
  1.4       +74 -27    db-ojb/forrest/src/documentation/content/xdocs/docu/performance.xml
  
  Index: performance.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/forrest/src/documentation/content/xdocs/docu/performance.xml,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- performance.xml	28 Apr 2004 08:03:52 -0000	1.3
  +++ performance.xml	14 Jun 2004 14:18:56 -0000	1.4
  @@ -318,12 +318,13 @@
   [ojb]      API  Period   Total  Insert   Fetch  Update  Delete
   [ojb]            [sec]   [sec]  [msec]  [msec]  [msec]  [msec]
   [ojb] --------------------------------------------------------
  -[ojb]     JDBC  25.934  25.703   10843     342    9861    4656
  -[ojb]       PB  26.461   26.21   11298     427    9889    4595
  -[ojb]     ODMG  55.146  49.341   25979   11249    5852    6260
  +[ojb]     JDBC   7.786   7.374    3951      76    2435     911
  +[ojb]       PB   9.807   8.333    5096     121    2192     922
  +[ojb]     ODMG  19.562  18.205    8432    1488    5064    3219
  +[ojb]      OTM  24.953  21.272   10688     223    4326    6033
   [ojb] ========================================================
   
  -[ojb] PerfTest takes 329 [sec]
  +[ojb] PerfTest takes 191 [sec]
               ]]></source>
               <p>
                   To change the test properties go to target
  @@ -340,8 +341,38 @@
                   <code>false</code> means run in
                   performance mode,
                   <code>true</code> means run in stress mode
  -                (useful for developer to check stability).
  +                (useful only for developer to check stability).
               </p>
  +            <source><![CDATA[
  +<target name="perf-test" depends="prepare-testdb"
  +            description="Simple performance benchmark and stress test for PB- and ODMG-api">
  +    <java fork="yes" classname="org.apache.ojb.performance.PerfMain"
  +          dir="${build.test}/ojb" taskname="ojb" failonerror="true" >
  +        <classpath refid="runtime-classpath"/>
  +
  +        <!-- comma separated list of the PerfTest implementations -->
  +        <arg value=
  +        "org.apache.ojb.broker.OJBPerfTest$JdbcPerfTest,\
  +        org.apache.ojb.broker.OJBPerfTest$PBPerfTest,\
  +        org.apache.ojb.broker.OJBPerfTest$ODMGPerfTest,\
  +        org.apache.ojb.broker.OJBPerfTest$OTMPerfTest"
  +        />
  +        <!-- test loops, default was 3 -->
  +        <arg value="3"/>
  +        <!-- performed threads, default was 10 -->
  +        <arg value="10"/>
  +        <!-- number of managed objects per thread, default was 2000 -->
  +        <arg value="2000"/>
  +        <!-- if 'false' we use performance mode, 'true' we do run in stress mode -->
  +        <arg value="false"/>
  +
  +        <jvmarg value="-Xms128m"/>
  +        <jvmarg value="-Xmx256m"/>
  +    </java>
  +    <!-- do some cleanup -->
  +    <ant target="copy-testdb"/>
  +</target>
  +            ]]></source>
           </section>
   
   
  @@ -350,35 +381,42 @@
               <title>How OJB compares to other O/R mapping tools?</title>
               <p>
                   Many user ask this question and there is more than one answer. But OJB
was
  -                shipped with a simple performance framework which allows a rudimentarily
  -                comparision of OJB with other (java-based) O/R mapping tools.
  +                shipped with a simple performance <em>"framework"</em> (independend
from OJB)
  +                which allows a rudimentarily comparision of OJB with other (java-based)
O/R mapping tools.
                   <br/>
  +                All involved classes can be found in dirctory <em>[db-ojb]/src/test</em>
in package
  +                <code>org.apache.ojb.performance</code>.
  +            </p>
  +            <p>
                   Call
                   <code>ant perf-test-jar</code>
                   to build the jar file contain all necessary classes to set up a test with
an
  -                arbitrary O/R mapper. After build the
  +                arbitrary O/R mapper. After the build, the
                   <code>db-ojb-XXX-performance.jar</code> can
                   be found in
                   <code>[db-ojb]/dist</code> directory.
               </p>
               <p>
  -                <strong>Steps to set up the test:</strong>
  +                <strong>Steps to set up the test for other O/R frameworks:</strong>
                   </p>
                   <ul>
                       <li>Implement a class derived from
  -                        <code>org.apache.ojb.performance.PerfTest</code>
  +                        <link href="ext:api/perf-test"><code>PerfTest</code></link>
                       </li>
                       <li>Implement a class derived from
  -                        <code>org.apache.ojb.performance.PerfHandle</code>
  +                        <link href="ext:api/perf-handle"><code>PerfHandle</code></link>
                       </li>
  -                    <li>[If persistent objects used within your mapping tool must
be derived from a special base
  -                        class or must be implement a special interface write your own persistent
object class
  -                        by implementing
  -                        <code>org.apache.ojb.performance.PerfArticle</code>
interface and override
  -                        method
  -                        <code>newPerfArticle()</code> in your PerfHandle implementation
class.
  +                    <li>[If persistent objects used within your mapping tool must
be derived from a specific
  +                        base class or must be implement a specific interface write your
own persistent
  +                        object class by implementing
  +                        <link href="ext:api/perf-article"><code>PerfArticle</code></link>
  +                        interface and <strong>override
  +                        method</strong>
  +                        <code>#newPerfArticle()</code> in your <code>PerfHandle</code>
implementation class.
                           <br/>
  -                        Otherwise the test use a default implementation of this interface.]
  +                        Otherwise a default implementation of
  +                        <link href="ext:api/perf-article"><code>PerfArticle</code></link>
  +                        was used]
                       </li>
                   </ul>
               <p>
  @@ -389,9 +427,12 @@
                   You can find a example implementation called
                   <code>org.apache.ojb.broker.OJBPerfTest</code> in the test-sources
directory
                   under
  -                <code>[db-ojb]/src/test/org/apache/ojb</code> (when using source-distribution).
  -                This implementation class is used to compare the PB-API, ODMG-API and native
JDBC and
  -                to test performance of the API implementations. See more section
  +                <code>[db-ojb]/src/test</code> (when using source-distribution).
  +                This implementation class is used to compare performance of the PB-API,
  +                ODMG-API, OTM-api and native JDBC.
  +            </p>
  +            <p>
  +                See more section
                   <link href="#multithreaded-performance">multi-threaded performance</link>.
                   <code>OJBPerfTest</code>
                   is made up of inner classes. At each case two inner classes represent a
test for
  @@ -429,11 +470,17 @@
   [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 false
  -            ]]></source>
  +run in performance mode if set false, default false]]]></source>
  +            <p>
  +                For example:
  +            </p>
  +<source><![CDATA[
  +java -classpath CLASSPATH my.A_PerfTest,my.B_PerfTest 3 10 2000 false]]></source>
  +            <p>
  +                This will use <code>A_PerfTest</code> and <code>B_PerfTest</code>
and perform
  +                three loops each loop run 10 threads and each thread operate on 2000 objects.
The
  +                test run in <em>performance</em> mode.
  +            </p>
               <p>
                   Take care of compareable configuration properties when run
                   performance tests with different O/R tools (caching, locking,
  
  
  
  1.19      +4 -1      db-ojb/forrest/src/documentation/content/xdocs/site.xml
  
  Index: site.xml
  ===================================================================
  RCS file: /home/cvs/db-ojb/forrest/src/documentation/content/xdocs/site.xml,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- site.xml	10 Jun 2004 14:46:04 -0000	1.18
  +++ site.xml	14 Jun 2004 14:18:56 -0000	1.19
  @@ -190,6 +190,9 @@
               <row-reader href="org/apache/ojb/broker/accesslayer/RowReader.html"/>
               <logger href="org/apache/ojb/broker/util/logging/Logger.html"/>
               <poor-mans-logger href="org/apache/ojb/broker/util/logging/PoorMansLoggerImpl.html"/>
  +            <perf-test href="org/apache/ojb/performance/PerfTest.html"/>
  +            <perf-handle href="org/apache/ojb/performance/PerfHandle.html"/>
  +            <perf-article href="org/apache/ojb/performance/PerfArticle.html"/>
           </api>
           <ojb>
               <wiki-page href="http://wiki.apache.org/db-ojb"/>
  
  
  

---------------------------------------------------------------------
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