[jboss-svn-commits] JBL Code SVN: r30860 - labs/jbosstm/workspace/whitingjr/trunk/performance.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Tue Dec 29 12:04:14 EST 2009
Author: whitingjr
Date: 2009-12-29 12:04:14 -0500 (Tue, 29 Dec 2009)
New Revision: 30860
Modified:
labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
Log:
Added support for multiple profiler vendors.
Modified: labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml 2009-12-29 17:03:26 UTC (rev 30859)
+++ labs/jbosstm/workspace/whitingjr/trunk/performance/build.xml 2009-12-29 17:04:14 UTC (rev 30860)
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?>
-<project name="JBoss TM performance comparison project" default="categorise" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
+<project name="JBoss TM performance comparison project" default="profile-agentlib" xmlns:artifact="antlib:org.apache.maven.artifact.ant">
<!--
This project executes the Hibernate sample application Caveat Emptor. There are two versions
and this project uses the version based on JPA. By running the sample test case and additional
@@ -59,6 +59,12 @@
</fileset>
</path>
+ <path id="profiler.library">
+ <fileset dir="lib/profilerdrivers/${profiler}">
+ <include name="*.jar" />
+ </fileset>
+ </path>
+
<path id="ant.classpath">
<pathelement path="${ant.home}/lib/ant" />
<pathelement path="${ant.home}/lib/optional.jar" />
@@ -79,8 +85,6 @@
<pathelement path="lib/hibernate-commons-annotations-3.1.0.GA.jar" />
<pathelement path="lib/hibernate-entitymanager-3.4.0.GA.jar" />
<pathelement path="lib/jbossjta-4.9.0.GA.jar" />
- <pathelement path="lib/jip-1.0.jar" />
- <pathelement path="lib/jip-client-1.0.jar" />
<pathelement path="lib/slf4j-api-1.5.8.jar" />
<pathelement path="lib/slf4j-log4j12-1.5.8.jar" />
<pathelement path="lib/commons-dbutils-1.2.jar" />
@@ -89,6 +93,7 @@
<pathelement path="lib/commons-lang-2.4.jar" />
<pathelement path="lib/thirdparty-all.jar" />
<path refid="database.driver" />
+ <path refid="profiler.library" />
</path>
<path id="run.classpath">
@@ -198,15 +203,15 @@
<loadproperties srcfile="${properties.home}/database/${resource.B.db.vendor}/db-profile.properties" />
<loadproperties srcfile="${properties.home}/database/${resource.B.db.vendor}/db-profile.properties" />
<loadproperties srcfile="${properties.home}/database/${resource.B.db.vendor}/database-locations/${resource.B.db.installation}/resourceB/connection.properties">
- <filterchain>
- <expandproperties />
- </filterchain>
- </loadproperties>
- <loadproperties srcfile="${properties.home}/database/${resource.B.db.vendor}/database-locations/${resource.B.db.installation}/resourceB/resource.properties">
- <filterchain>
- <expandproperties />
- </filterchain>
- </loadproperties>
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </loadproperties>
+ <loadproperties srcfile="${properties.home}/database/${resource.B.db.vendor}/database-locations/${resource.B.db.installation}/resourceB/resource.properties">
+ <filterchain>
+ <expandproperties />
+ </filterchain>
+ </loadproperties>
</target>
<target name="prepare" depends="check-arguments, check-setup, second-resource">
@@ -219,7 +224,7 @@
<loadproperties srcfile="${properties.home}/log-store/store-data.properties" />
<loadproperties srcfile="${properties.home}/jdbc-resource/${resource.A.jdbc-datasource}/datasource.properties" />
<loadproperties srcfile="${properties.home}/database/${resource.A.db.vendor}/db-profile.properties" />
-
+
<loadproperties srcfile="${properties.home}/database/${resource.A.db.vendor}/database-locations/${resource.A.db.installation}/resourceA/connection.properties">
<filterchain>
<expandproperties />
@@ -230,24 +235,27 @@
<expandproperties />
</filterchain>
</loadproperties>
-
+
<loadproperties srcfile="${properties.home}/database/shared-database.properties" />
- <copy file="src/main/resources/profile-remote.properties" tofile="build/classes/profile.properties">
+ <copy file="src/main/resources/META-INF/persistence.xml" todir="build/classes/META-INF">
<filterchain>
<expandproperties />
- <expandproperties />
</filterchain>
</copy>
- <copy file="src/main/resources/META-INF/persistence.xml" todir="build/classes/META-INF">
+
+ <property name="db-vendor-profiling" value="${db-vendor-profiling.A},${db-vendor-profiling.B}" />
+ <copy file="src/main/resources/profile-remote.properties" tofile="build/classes/profile.properties">
<filterchain>
<expandproperties />
+ <expandproperties />
</filterchain>
</copy>
+
<xslt in="src/main/resources/META-INF/caveatemptor-beans.xml" out="build/classes/META-INF/caveatemptor-beans-property-ready.xml" style="src/main/resources/xsl/jdbc-datasource/prepare-jdbc-resolving-properties.xsl">
- <outputproperty name="indent" value="yes" />
+ <outputproperty name="indent" value="yes" />
<param name="resource.A.jdbc" expression="${resource.A.jdbc-datasource}" />
- <param name="resource.B.jdbc" expression="${resource.B.jdbc-datasource}" />
- </xslt>
+ <param name="resource.B.jdbc" expression="${resource.B.jdbc-datasource}" />
+ </xslt>
<copy file="build/classes/META-INF/caveatemptor-beans-property-ready.xml" tofile="build/classes/META-INF/caveatemptor-beans.xml">
<filterchain>
<expandproperties />
@@ -283,12 +291,11 @@
<include name="**/*.class" />
</patternset>
</unzip>
- <echo message="Running with hibernate dialect [${hibernate.dialect}] and transaction management [${transaction.strategy}]" />
<delete dir="logs/profiled" />
<mkdir dir="logs/profiled" />
<property name="db-vendor-package.xpath" value="${db-vendor-package.xpath.A},${db-vendor-package.xpath.B}"/>
- <property name="db-vendor-profiling" value="${db-vendor-profiling.A},${db-vendor-profiling.B}" />
-
+ <loadproperties srcfile="src/main/resources/properties/profiler/${profiler}/configuration.properties"/>
+
</target>
<target name="compile" depends="prepare,check-xa-support">
@@ -298,8 +305,10 @@
<target name="profile" depends="compile">
<testng outputDir="${test.output.dir}">
- <jvmarg value="-javaagent:lib/profile.jar" />
- <jvmarg value="-Dprofile.properties=build/classes/profile.properties" />
+ <jvmarg value="${profiler.agent.argument}" />
+ <jvmarg value="${profiler.vm.arguments}" />
+ <!--jvmarg value="-agentlib:${profiler.agent.library}" />
+ <jvmarg value="-Xbootclasspath/a:${profiler.xbootclasspath}"/-->
<jvmarg value="-Djboss.server.data.dir=${jboss.server.data.dir}" />
<jvmarg value="-Xdebug" />
<jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=8000" />
@@ -309,11 +318,27 @@
<xmlfileset file="build/classes/testsuite-integration.xml" />
</testng>
</target>
+
+ <target name="profile-agentlib" depends="compile">
+ <property name="LD_LIBRARY_PATH" value="lib"/>
+ <testng outputDir="${test.output.dir}">
+ <jvmarg value="${profiler.agent.argument}" />
+ <jvmarg value="${profiler.vm.arguments}" />
+ <jvmarg value="-Djboss.server.data.dir=${jboss.server.data.dir}" />
+ <jvmarg value="-Xdebug" />
+ <jvmarg value="-Xrunjdwp:transport=dt_socket,server=y,suspend=${suspend},address=8000" />
+ <classpath>
+ <path refid="test.classpath" />
+ </classpath>
+ <xmlfileset file="build/classes/testsuite-integration.xml" />
+ </testng>
+ </target>
+
<target name="categorise" depends="profile">
<property name="xpaths-csv" value="${testcase.xpaths},${db-vendor.method.xpaths.A},${db-vendor.method.xpaths.B}" />
<tstamp />
- <copy file="logs/profiled/DATE-TIME-profile.xml" tofile="logs/${DSTAMP}-${TSTAMP}-profile-raw.xml" />
+ <copy file="logs/profiled/DATE-TIME-profile.xml" tofile="logs/${DSTAMP}-${TSTAMP}-${resource.A.db.vendor}-${resource.B.db.vendor}-profile-raw.xml" />
<echo message="db vendor package[${db-vendor-package.xpath}]">
</echo>
<xslt style="src/main/resources/xsl/analyseresults.xsl" in="logs/profiled/DATE-TIME-profile.xml" out="logs/${DSTAMP}-${TSTAMP}-profile-analysis.xml">
@@ -323,18 +348,6 @@
<param name="xpaths" expression="${xpaths-csv}" />
</xslt>
</target>
- <!--target name="transform">
- <property name="db-vendor-package.xpath" value="oracle" />
- <property name="xpaths-csv" value="auction.dao.ejb3.GenericEJB3DAO:makePersistent" />
- <echo message="db vendor packages[${db-vendor-package.xpath.A},${db-vendor-package.xpath.B}]xpaths-csv[${xpaths-csv}]">
- </echo>
- <xslt style="src/main/resources/xsl/analyseresults.xsl" in="logs/profiled/DATE-TIME-profile.xml" out="logs/onthefly-profile-analysis.xml">
- <outputproperty name="indent" value="yes" />
- <param name="db-vendor-package.A" expression="${db-vendor-package.xpath.A}" />
- <param name="db-vendor-package.B" expression="${db-vendor-package.xpath.B}" />
- <param name="xpaths" expression="${xpaths-csv}" />
- </xslt>
- </target-->
<target name="usage">
<echo>Usage: ant ${required-args} [${optional-args}]</echo>
More information about the jboss-svn-commits
mailing list