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

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Wed Oct 27 09:01:48 EDT 2010


Author: jesper.pedersen
Date: 2010-10-27 09:01:48 -0400 (Wed, 27 Oct 2010)
New Revision: 108932

Modified:
   projects/jboss-jca/branches/performance/build.xml
   projects/jboss-jca/branches/performance/doc/perfguide/en/modules/about.xml
   projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml
   projects/jboss-jca/branches/performance/jmeter/build.xml
Log:
[JBJCA-452] Add JMeter setup documentation

Modified: projects/jboss-jca/branches/performance/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/build.xml	2010-10-27 12:57:41 UTC (rev 108931)
+++ projects/jboss-jca/branches/performance/build.xml	2010-10-27 13:01:48 UTC (rev 108932)
@@ -114,7 +114,10 @@
   <property name="version.jboss.jnp-client" value="5.0.5.Final"/>
   <property name="version.jboss.serialization" value="1.0.3.GA"/>
   <property name="version.jboss.remoting" value="2.5.3"/>
+  <property name="version.jboss.servlet-api" value="2.5.0.GA"/>
+  <property name="version.jboss.jboss-transaction-api" value="1.0.1.GA"/>
 
+
   <!-- ================================= 
        Bootstrap Ivy
        ================================= -->
@@ -356,4 +359,11 @@
     <ivy:cleancache />
   </target>
 
+  <!-- ================================= 
+       Target: jmeter              
+       ================================= -->
+  <target name="jmeter">
+    <ant dir="jmeter" target="jmeter"/>
+  </target>
+
 </project>

Modified: projects/jboss-jca/branches/performance/doc/perfguide/en/modules/about.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/en/modules/about.xml	2010-10-27 12:57:41 UTC (rev 108931)
+++ projects/jboss-jca/branches/performance/doc/perfguide/en/modules/about.xml	2010-10-27 13:01:48 UTC (rev 108932)
@@ -26,7 +26,7 @@
     <para>
       Dimitris Andreadis, Carlo de Wolf, Jason Green, Jonathan Halliday, Søren Hilmer, Vicky Kak,  
       Aslak Knutsen, Sacha Labourey, Alexey Loubyansky, Patrick MacDonald, Andrig Miller,
-      Andrew Lee Rubinger, Anil Saldhana and Scott Stark.
+      Andrew Lee Rubinger, Anil Saldhana, Scott Stark and Jeremy Whiting.
     </para>
     
     <para>And a special thanks goes to Adrian Brock and Ales Justin for their continuous support of this project.</para>

Modified: projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml
===================================================================
--- projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml	2010-10-27 12:57:41 UTC (rev 108931)
+++ projects/jboss-jca/branches/performance/doc/perfguide/en/modules/benchmark.xml	2010-10-27 13:01:48 UTC (rev 108932)
@@ -7,7 +7,7 @@
    <section id="servers">
      <title>JBoss AS and IronJacamar</title>
 
-     <para>JBoss AS 4.2.X, 5.X, 6.0 M4, IronJacamar Beta1 and daily</para>
+     <para>JBoss AS 4.2.X, 5.X, 6.0 M4, IronJacamar Beta3 and daily</para>
 
      <programlisting>
 ant download-servers
@@ -18,5 +18,26 @@
 ant benchmark-report-summary
      </programlisting>
    </section>
+   <section id="servers">
+   <title>IronJacamar and JMeter</title>
 
+   <para>JMeter has been setup to benchmark the IronJacama server for HTTP and JDBC loads. Using JMeter has the benefit of using it's flexible test configuration, results sampling and graphing capabilities.</para>
+   <para>Before using JMeter to benchmark you will need to run the following Ant targets only once. Execute these in the root directory of the performance branch. This will retrieve the sever distribution(s) needed and configures the file permissions necessary to start the server.</para>
+   <programlisting>
+ant download-servers
+ant benchmark</programlisting>
+     
+   <para>To start JMeter call the following Ant target. Calling this target starts a HSQLDB database and server required for benchmarking. The started database is populated with sample data. When the target executes it detects if a database is already running and will start it if not. The target does the same for the server.</para>
+   <programlisting>ant jmeter</programlisting>
+
+   <para>With the JMeter integration comes several Test Plans. Test Plans are JMeter test configurations containing the sequence of requests to create the desired load. The included test plans are straight forward. The default test plan is the first listed below and will be loaded when JMeter is started. To load a different test plan select "File - Open" from the JMeter menu.</para>
+   <programlisting>src/main/resources/jmeter/Http-Test.jmx
+src/main/resources/jmeter/CPU-usage-Http-Test.jmx (not available in Beta3 release)
+src/main/resources/jmeter/Direct-JDBC.jmx
+src/main/resources/jmeter/CPU-usage-Direct-JDBC.jmx (not available in Beta3 release)</programlisting>
+   </section>
+   
+   <para>The number of concurrent threads executing the requests can be configured in JMeter. See the <ulink url="http://jakarta.apache.org/jmeter/usermanual/index.html">JMeter User Manual</ulink> for step-by-step instructions.</para>
+   <para>To view the performance graph during a test run select the "Graph Results" node in the Test Plan.</para>
+
 </chapter>

Modified: projects/jboss-jca/branches/performance/jmeter/build.xml
===================================================================
--- projects/jboss-jca/branches/performance/jmeter/build.xml	2010-10-27 12:57:41 UTC (rev 108931)
+++ projects/jboss-jca/branches/performance/jmeter/build.xml	2010-10-27 13:01:48 UTC (rev 108932)
@@ -22,6 +22,9 @@
 -->
 <project name="ironjacamar-performance-jmeter" default="jmeter" xmlns:ivy="antlib:org.apache.ivy.ant">
 
+  <import file="../build.xml" as="build-root" />
+  <import file="../servers/build.xml" as="build-servers" />
+
   <!-- ================================= 
        Properties              
        ================================= -->
@@ -32,10 +35,9 @@
   <property name="javac.deprecation" value="false" />
   <property name="javac.optimize" value="false" />
   <property name="target.dir" value="false" />
-  <property name="jbjca-home" value="../root/servers/jbjca-1.0.0.Beta2/ironjacamar-1.0.0.Beta3" />
+  <property name="server-home" value="../root/servers/jbjca-${ironjacamar.version}/ironjacamar-${ironjacamar.version}" />
   <property name="jmeter.tools.dir" value="../tools/jmeter" />
   <property name="hsqldb.tools.dir" value="../tools/hsqldb" />
-  <import file="../build.xml" as="build-root"/>
   
   <path id="src.compile.classpath">
     <fileset dir="../lib/common" includes="*.jar" />
@@ -43,10 +45,10 @@
   
   <path id="jmeter.classpath">
     <fileset dir="${jmeter.tools.dir}">
-      <include name="**/*.jar"/>
+      <include name="**/*.jar" />
     </fileset>
     <fileset dir="${hsqldb.tools.dir}">
-      <include name="**/*.jar"/>
+      <include name="**/*.jar" />
     </fileset>
   </path>
   
@@ -59,13 +61,14 @@
     
     <delete>
       <fileset dir="${build.jmeter.dir}/impl">
-        <include name="**/*.class"/>
+        <include name="**/*.class" />
       </fileset>
     </delete>
-    <javac srcdir="src/main/java"
-           destdir="${build.jmeter.dir}/impl"
-           classpathref="src.compile.classpath"
-           debug="true" deprecation="true" optimize="true" >
+    <javac srcdir="src/main/java" destdir="${build.jmeter.dir}/impl"
+           classpathref="src.compile.classpath" 
+           debug="true"
+           deprecation="true"
+           optimize="true">
       <compilerarg value="-Xlint" />
     </javac>
   </target>
@@ -77,25 +80,28 @@
     <mkdir dir="${build.jmeter.dir}/jars" />
     <mkdir dir="${build.jmeter.dir}/wars" />
     
-    <delete file="${build.jmeter.dir}/jars/ironjacamar-performance-jmeter.jar"/>
+    <delete file="${build.jmeter.dir}/jars/ironjacamar-performance-jmeter.jar" />
     
     <jar destfile="${build.jmeter.dir}/jars/ironjacamar-performance-jmeter.jar"
-         basedir="${build.jmeter.dir}/impl" index="true">
+         basedir="${build.jmeter.dir}/impl" 
+         index="true">
       <manifest>
-	<attribute name="Implementation-Title" value="ironjca performance jetty" />
-	<attribute name="Implementation-Vendor" value="JBoss" />
-	<attribute name="Implementation-Vendor-Id" value="org.jboss" />
+        <attribute name="Implementation-Title" value="IronJacamar Performance JMeter" />
+        <attribute name="Implementation-Vendor" value="JBoss, by Red Hat" />
+        <attribute name="Implementation-Vendor-Id" value="org.jboss" />
       </manifest>
     </jar>
     
-    <delete file="${build.jmeter.dir}/wars/jbjca-web.war"/>
+    <delete file="${build.jmeter.dir}/wars/jbjca-web.war" />
     
-    <war destfile="${build.jmeter.dir}/wars/jbjca-web.war" webxml="src/main/resources/WEB-INF/web.xml" index="true">
+    <war destfile="${build.jmeter.dir}/wars/jbjca-web.war" 
+         webxml="src/main/resources/WEB-INF/web.xml"
+         index="true">
       <fileset dir="src/main/resources/web">
-	<include name="**/*"/>
+        <include name="**/*" />
       </fileset>
       <lib dir="${build.jmeter.dir}/jars">
-	<include name="ironjacamar-performance-jmeter.jar" />
+        <include name="ironjacamar-performance-jmeter.jar" />
       </lib>
       <manifest>
         <attribute name="Implementation-Title" value="ironjca performance jetty Web Module" />
@@ -103,75 +109,81 @@
         <attribute name="Implementation-Vendor-Id" value="org.jboss" />
       </manifest>
       <metainf dir="src/main/resources">
-	<include name="context.xml"/>
+        <include name="context.xml" />
       </metainf>
     </war>
   </target>
   
-  <target name="deploy" depends="wars,build-root.download-servers">
-    <copy file="${build.jmeter.dir}/wars/jbjca-web.war" todir="${jbjca-home}/system"/>
-    <copy file="src/main/resources/jca-local-h2-ds.xml" todir="${jbjca-home}/deploy"/>
+  <target name="deploy" depends="wars">
+    <copy file="${build.jmeter.dir}/wars/jbjca-web.war" todir="${server-home}/system" />
+    <copy file="src/main/resources/jca-local-h2-ds.xml" todir="${server-home}/deploy" />
+    <copy file="../tools/hsqldb/lib/hsqldb.jar" todir="${server-home}/lib" />
   </target>
   
-  <target name="jmeter" depends="server">
-    <java jar="${jmeter.tools.dir}/bin/ApacheJMeter.jar" fork="true" spawn="true" classpathref="jmeter.classpath" >
-      <jvmarg value="-Dapple.laf.useScreenMenuBar=true"/>
-      <arg value="-t"/>
-      <arg value="src/main/resources/jmeter/Http-Test.jmx"/>
+  <target name="jmeter" depends="deploy,server">
+    <java jar="${jmeter.tools.dir}/bin/ApacheJMeter.jar" 
+          fork="true"
+          spawn="true" 
+          classpathref="jmeter.classpath">
+      <jvmarg value="-Dapple.laf.useScreenMenuBar=true" />
+      <arg value="-t" />
+      <arg value="src/main/resources/jmeter/Http-Test.jmx" />
     </java>
-    <echo message="Started JMeter."/>
+    <echo message="Started JMeter." />
   </target>
   
   <target name="database" unless="database.isAvailable" depends="check-database-isRunning">
     <java fork="true" spawn="true" classpathref="jmeter.classpath" classname="org.hsqldb.Server">
-      <arg value="-database.0"/>
-      <arg value="mem:jbjca"/>
-      <arg value="-silent"/>
-      <arg value="false"/>
+      <arg value="-database.0" />
+      <arg value="mem:jbjca" />
+      <arg value="-silent" />
+      <arg value="true" />
     </java>
     <parallel>
       <waitfor maxwait="1" maxwaitunit="minute" checkevery="1" checkeveryunit="second">
-        <socket server="localhost" port="9001"/>
+        <socket server="localhost" port="9001" />
       </waitfor>
     </parallel>
-    <echo message="Database started."/>
-    <antcall target="sample-data"/>
-    <echo message="Sample data loaded."/>
+    <echo message="Database started." />
+    <antcall target="sample-data" />
+    <echo message="Sample data loaded." />
   </target>
   
   <target name="check-database-isRunning">
-    <condition property="database.isAvailable" >
-      <socket server="localhost" port="9001"/>
+    <condition property="database.isAvailable">
+      <socket server="localhost" port="9001" />
     </condition>
-    <echo message="Status of running database is [${database.isAvailable}]."/>
+    <echo message="Status of running database is [${database.isAvailable}]." />
   </target>
   
   <target name="shutdown-database">
     <sql driver="org.hsqldb.jdbc.JDBCDriver" 
          url="jdbc:hsqldb:hsql://localhost" 
          userid="sa" password="" 
-         classpathref="jmeter.classpath" onerror="stop">
+         classpathref="jmeter.classpath"
+         onerror="stop">
       SHUTDOWN;
     </sql>
   </target>
   
   <target name="sample-data">
-    <sql src="src/main/resources/sql/sample-data.sql"
+    <sql src="src/main/resources/sql/sample-data.sql" 
          driver="org.hsqldb.jdbc.JDBCDriver" 
          url="jdbc:hsqldb:hsql://localhost" 
-         userid="sa" password="" classpathref="jmeter.classpath"/>
+         userid="sa" password="" 
+         classpathref="jmeter.classpath" />
   </target>
   
   <target name="server" unless="server.isAvailable" depends="database,check-server-isRunning">
-    <exec executable="./run.sh" spawn="true" dir="${jbjca-home}/bin"/>
-    <echo message="Started server."/>
+    <exec executable="./run.sh" spawn="true" dir="${server-home}/bin" />
+    <echo message="Started server." />
   </target>
   
   <target name="check-server-isRunning">
-    <condition property="server.isAvailable" >
-      <http url="http://localhost:8080/"/>
+    <condition property="server.isAvailable">
+      <http url="http://localhost:8080/" />
     </condition>
-    <echo message="Status of running server is [${server.isAvailable}]."/>
+    <echo message="Status of running server is [${server.isAvailable}]." />
   </target>
-
+  
 </project>



More information about the jboss-cvs-commits mailing list