[jboss-cvs] JBossAS SVN: r111465 - in projects/jboss-jca/branches/performance: doc/perfguide/en-US/modules and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu May 26 15:25:00 EDT 2011


Author: jesper.pedersen
Date: 2011-05-26 15:25:00 -0400 (Thu, 26 May 2011)
New Revision: 111465

Added:
   projects/jboss-jca/branches/performance/doc/perfguide/en-US/modules/perfenv.xml
   projects/jboss-jca/branches/performance/perfenv/src/main/resources/cli.sh
Modified:
   projects/jboss-jca/branches/performance/doc/perfguide/en-US/perfguide.xml
Log:
Initial perfenv documentation, and cli script

Added: projects/jboss-jca/branches/performance/doc/perfguide/en-US/modules/perfenv.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/en-US/modules/perfenv.xml	                        (rev 0)
+++ projects/jboss-jca/branches/performance/doc/perfguide/en-US/modules/perfenv.xml	2011-05-26 19:25:00 UTC (rev 111465)
@@ -0,0 +1,197 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<chapter id="perfenv">
+   <title>Performance environment</title>
+
+   <para>The performance environment is meant to automate performance regression
+     testing of the IronJacamar container.</para>
+
+   <para>The idea is that multi versions of the container can be tested - in multiple
+     configurations - against a list of test cases. This way any regressions can be
+     spotted and actions can be taken.</para>
+
+   <section id="perfenv_build">
+     <title>Build</title>
+
+     <para>The performance environment is built using</para>
+
+     <programlisting>
+ant perfenv
+     </programlisting>
+
+     <para>on the <code>performance</code> branch of the IronJacamar project.</para>
+
+     <para>The result of the built is located in <code>target/perfenv</code>.</para>
+
+   </section>
+
+   <section id="perfenv_installation">
+     <title>Installation</title>
+
+     <para>The environment contains the following directories.</para>
+
+     <section id="perfenv_installation_bin">
+       <title><code>bin</code></title>
+       
+       <para>The <code>bin</code> directory contains the shell script needed to start the environment.</para>
+
+     <programlisting>
+./perf.sh
+     </programlisting>
+
+     </section>
+
+     <section id="perfenv_installation_config">
+       <title><code>config</code></title>
+       
+       <para>The <code>config</code> directory contains the configuration of the environment, like</para>
+
+     <programlisting>
+logging.properties
+     </programlisting>
+
+     <para>.</para>
+
+     </section>
+
+     <section id="perfenv_installation_deployments">
+       <title><code>deployments</code></title>
+       
+       <para>The <code>deployments</code> directory should contain the deployments that should be used 
+         during the performance runs.</para>
+
+       <para>These could include:</para>
+
+     <programlisting>
+h2.jar
+h2-ds.xml
+h2-xa-ds.xml
+jdbc-local.rar
+jdbc-xa.rar
+     </programlisting>
+
+     </section>
+
+     <section id="perfenv_installation_installations">
+       <title><code>installations</code></title>
+       
+       <para>The <code>installations</code> directory should contain all the installations of the IronJacamar container
+         in its binary form.</para>
+
+       <para>These could include:</para>
+
+     <programlisting>
+ironjacamar-1.0.0.Beta7/
+ironjacamar-1.0.0.CR1/
+ironjacamar-1.0.0.Final/
+daily/
+     </programlisting>
+
+     <para>The directory name will used for the profile name of the installation.</para>
+
+     <para>A daily snapshot of the distribution can be obtained by running <code>ant clean sjc</code> on
+       <code>trunk/</code> of the project.</para>
+
+     </section>
+
+     <section id="perfenv_installation_lib">
+       <title><code>lib</code></title>
+       
+       <para>The <code>lib</code> directory contains the libraries that makes up the environment.</para>
+
+     </section>
+
+     <section id="perfenv_installation_tests">
+       <title><code>tests</code></title>
+       
+       <para>The <code>tests</code> directory should contain the test cases that should be run
+         against each of the profiles.</para>
+
+       <para>For example:</para>
+
+     <programlisting>
+ironjacamar-performance-perfenv-tests.jar
+     </programlisting>
+
+     </section>
+
+   </section>
+
+   <section id="perfenv_running_server">
+     <title>Running the server</title>
+
+     <para>The performance environment is started using</para>
+
+     <programlisting>
+cd bin
+./perf.sh
+     </programlisting>
+
+     <para>The server will activate the first profile it finds automatically.</para>
+
+   </section>
+
+   <section id="perfenv_running_client">
+     <title>Running the client</title>
+
+     <para>The performance environment features a command line client (CLI) which can be used by</para>
+
+     <programlisting>
+cd bin/
+./cli.sh
+     </programlisting>
+
+     <para>The CLI features various commands:</para>
+
+     <programlisting>
+activate &lt;java.lang.String&gt; &lt;java.lang.Boolean&gt;
+deactivate
+deploy &lt;java.lang.String&gt;
+getprofiles
+help
+reload
+run &lt;java.lang.String&gt;
+shutdown
+undeploy &lt;java.lang.String&gt;
+     </programlisting>
+
+   </section>
+
+   <section id="perfenv_test">
+     <title>Performance tests</title>
+
+     <para>A performance test can be implemented by implementing the following interface:</para>
+
+     <programlisting>
+org.jboss.jca.performance.perfenv.Test
+     </programlisting>
+
+     <para>Note, that currently arguments are not passed in to the test case.</para>
+
+   </section>
+
+   <section id="perfenv_wire_format">
+     <title>Wire format</title>
+
+     <para>The performance environment can be controlled over a <code>java.net.Socket</code> connection - 
+        default host address is <code>localhost</code> and port <code>7000</code>.</para>
+
+     <para>TODO: Document wire format once stable. See CLI for now.</para>
+
+   </section>
+
+   <section id="perfenv_wire_example">
+     <title>Example</title>
+
+     <para>An example of running a H2 test case:</para>
+
+     <programlisting>
+./cli.sh deactivate            # Deactivates current profile
+./cli.sh activate sjc false    # Activates 'sjc' profile using NoopTS
+./cli.sh deploy jdbc-local.rar # Deploys jdbc-local.rar artifact
+./cli.sh deploy h2-ds.xml      # Deploys h2-ds.xml artifact
+./cli.sh run MyH2Test          # Runs MyH2Test (fully qualified class name)
+     </programlisting>
+
+   </section>
+
+</chapter>

Modified: projects/jboss-jca/branches/performance/doc/perfguide/en-US/perfguide.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/en-US/perfguide.xml	2011-05-26 18:50:51 UTC (rev 111464)
+++ projects/jboss-jca/branches/performance/doc/perfguide/en-US/perfguide.xml	2011-05-26 19:25:00 UTC (rev 111465)
@@ -5,6 +5,7 @@
         <!ENTITY introduction SYSTEM "modules/introduction.xml">
         <!ENTITY profiler SYSTEM "modules/profiler.xml">
         <!ENTITY benchmark SYSTEM "modules/benchmark.xml">
+        <!ENTITY perfenv SYSTEM "modules/perfenv.xml">
         ]>
 <book lang="en">
    <bookinfo>
@@ -29,4 +30,7 @@
    &profiler;
 
    &benchmark;
+
+   &perfenv;
+
 </book>

Added: projects/jboss-jca/branches/performance/perfenv/src/main/resources/cli.sh
===================================================================
--- projects/jboss-jca/branches/performance/perfenv/src/main/resources/cli.sh	                        (rev 0)
+++ projects/jboss-jca/branches/performance/perfenv/src/main/resources/cli.sh	2011-05-26 19:25:00 UTC (rev 111465)
@@ -0,0 +1,17 @@
+#!/bin/sh
+
+# Setup the JVM
+if [ "x$JAVA" = "x" ]; then
+    if [ "x$JAVA_HOME" != "x" ]; then
+        JAVA="$JAVA_HOME/bin/java"
+    else
+        JAVA="java"
+    fi
+fi
+
+# Setup the JVM options
+JAVA_OPTS="$JAVA_OPTS -Xmx512m"
+
+# Start Perf
+"$JAVA" $JAVA_OPTS \
+    -classpath ../lib/ironjacamar-performance-perfenv.jar org.jboss.jca.performance.perfenv.CLI "$@"



More information about the jboss-cvs-commits mailing list