[jboss-svn-commits] JBL Code SVN: r36790 - labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Mon Mar 14 06:37:41 EDT 2011


Author: whitingjr
Date: 2011-03-14 06:37:41 -0400 (Mon, 14 Mar 2011)
New Revision: 36790

Added:
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.properties
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.xml
Log:
Renamed files.

Copied: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.properties (from rev 36601, labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.properties)
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.properties	2011-03-14 10:37:41 UTC (rev 36790)
@@ -0,0 +1,35 @@
+#Thu Jul 01 13:05:21 BST 2010
+spec.install.dir=/specjms2007
+
+# the commands need placing in this properties file
+start.controller.command=nohup ${env.ANT_HOME}/bin/ant -buildfile ${spec.install.dir}/build.xml startController -Dcontroller.host=jmsclient1 > /tmp/controller.txt &
+start.satellite.one=nohup ${env.ANT_HOME}/bin/ant -buildfile ${spec.install.dir}/build.xml startSatellite -Dcontroller.host=jmsclient1 > /tmp/satellite-jmsclient1.txt &
+start.satellite.two=nohup ${env.ANT_HOME}/bin/ant -buildfile ${spec.install.dir}/build.xml startSatellite -Dcontroller.host=jmsclient1 > /tmp/satellite-jmsclient2.txt &
+start.satellite.three=nohup ${env.ANT_HOME}/bin/ant -buildfile ${spec.install.dir}/build.xml startSatellite -Dcontroller.host=jmsclient1 > /tmp/satellite-jmsclient3.txt &
+start.satellite.four=nohup ${env.ANT_HOME}/bin/ant -buildfile ${spec.install.dir}/build.xml startSatellite -Dcontroller.host=jmsclient1 > /tmp/satellite-jmsclient4.txt &
+
+start.eap.command=nohup ${env.EAP_HOME}/bin/run.sh -c production -b hornetq &
+
+server.startup.sleep.inMinutes=3
+server.startup.check.inMilliseconds=500
+
+temporary.directory=/tmp
+jps.output.file=/tmp/jpsProgram.pid
+
+start.jstat.1=jstat -gcutil -t -h12
+start.jstat.2=5s > ${env.EAP_HOME}/server/production/log/jstat-hornetq.txt &
+
+server.deployment.dir=${env.EAP_HOME}
+
+benchmark.process.name=SPECjmsControlDriver
+
+completion.wait.period.inMilliSeconds=60000
+
+wait.benchmark.startup.period.inSeconds=25
+
+waitfor.eap.url=http://hornetq:8080/index.html
+
+timestamp.file.name=run-start.properties
+
+jms.raw.file=/tmp/jms.txt
+jms.output.file=/tmp/jms.properties
\ No newline at end of file

Copied: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.xml (from rev 36763, labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml)
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.xml	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/client-api.xml	2011-03-14 10:37:41 UTC (rev 36790)
@@ -0,0 +1,656 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+Copyright 2009 Red Hat, Inc.
+ Red Hat licenses this file to you under the Apache License, version
+ 2.0 (the "License"); you may not use this file except in compliance
+ with the License.  You may obtain a copy of the License at
+   http://www.apache.org/licenses/LICENSE-2.0
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied.  See the License for the specific language governing
+ permissions and limitations under the License.
+  -->
+<!--
+   This file contains the low level api that should not be called
+   on the command line directly.
+-->
+<project name="RedHat-JBoss-Performance:API" default="usage" basedir=".">
+   
+   <taskdef name="xmltask" classname="com.oopsconsultancy.xmltask.ant.XmlTask"/>
+   <taskdef resource="net/sf/antcontrib/antcontrib.properties"/>
+   <taskdef name="groovy" classname="org.codehaus.groovy.ant.Groovy"/>
+
+   <import file="common/common-api.xml"/>
+   
+   <property environment="env"/>
+   <loadproperties srcfile="build-api.properties">
+      <filterchain>
+         <expandproperties />
+      </filterchain>
+   </loadproperties>
+      
+   <property name="framework.properties.dir" location="${env.HOME}/.specjms" />
+   <property name="framework.file" location="${framework.properties.dir}/specjms.seq" />
+   <property file="${framework.file}" />
+   <property file="../src/main/resources/environments/${env.BENCHMARK_SYSTEM}/environment.properties" />
+   
+   <target name="clean">
+      <echo>Removing prior run collected data.</echo>
+      <delete failonerror="false" file="${spec.install.dir}/config/run.conf"/>
+      <delete failonerror="false" file="${spec.install.dir}/config/jstat-hornetq.txt"/>
+      <delete failonerror="false" file="${spec.install.dir}/config/verbose-gc.txt"/>
+      <delete failonerror="false" file="${spec.install.dir}/config/verbose-gc-stats.txt"/>
+      <delete failonerror="false" file="${spec.install.dir}/execution-result-data.xml"/>
+         <delete failonerror="false" file="${spec.install.dir}/execution-result-data.xml"/>
+   </target>
+   
+   <target name="prepare-eap-server">
+      <echo>Preparing EAP server.</echo>
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
+         command="${env.ANT_HOME}/bin/ant -buildfile java/batch-execution-SPEC-jms2007/scripts/server-controller/server-commands.xml start"/>
+      
+      <echo>Waiting ${server.startup.sleep.inMinutes} minutes to allow the server to startup.</echo>
+      <parallel>
+         <waitfor maxwait="${server.startup.sleep.inMinutes}" maxwaitunit="minute" checkevery="${server.startup.check.inMilliseconds}">
+           <http url="${waitfor.eap.url}"/>
+         </waitfor>
+      </parallel>
+      
+      <delete file="${jps.output.file}" failonerror="false"/>
+      <scp remotefile="${eap.server.username}@${eap.server.host}:${jps.output.file}" localTodir="${jps.output.file}" failonerror="false" password="${eap.server.password}"/>
+      
+      <sleep seconds="10"/>
+      
+      <condition property="pid.file.isAvailable">
+         <available file="${jps.output.file}"/>
+      </condition>
+      
+      <antcall target="start-jstat" inheritall="true"/>
+   </target>
+   
+   <target name="start-jstat" if="pid.file.isAvailable">
+      <property file="${jps.output.file}" />
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
+         command="${start.jstat.1} ${process.pid} ${start.jstat.2}"/>
+   </target>
+   
+   <target name="stop-eap-server">
+      <echo>Stopping EAP server.</echo>
+      <sshexec host="${eap.server.host}"
+         username="${eap.server.username}"
+         password="${eap.server.password}"
+         command="/usr/share/ant/v1.7.1/bin/ant -buildfile java/batch-execution-SPEC-jms2007/scripts/server-controller/server-commands.xml stop"/>
+   </target>
+   
+   <target name="gather-configuration" depends="clean">
+      <echo>Gathering configuration located on EAP server.</echo>
+      <scp remotefile="${eap.server.username}@${eap.server.host}:${server.deployment.dir}/bin/run.conf" localTodir="${spec.install.dir}/config/run.conf" failonerror="true" password="${eap.server.password}"/>
+      <scp remotefile="${eap.server.username}@${eap.server.host}:${server.deployment.dir}/server/production/deploy/hornetq/hornetq-configuration.xml" localTodir="${spec.install.dir}/config/hornetq-configuration.xml" failonerror="false" password="${eap.server.password}"/>
+   </target>
+
+   <target name="start-benchmark">
+      <!--tstamp property="run.start.timestamp" pattern="HH:mm:ss EEE dd MM yyyy"/>
+      <groovy>
+         jtimestamp = new Date().time
+         def timestampFile = new File("${properties['spec.install.dir']}/output/${properties['org.spec.internal.runId']}/${properties['timestamp.file.name']}")
+         timestampFile.write("start.timestamp=${properties['run.start.timestamp']}")
+         timestampFile.append('\n')
+         timestampFile.append("start.jtimestamp=")
+         timestampFile.append(jtimestamp)
+         timestampFile.append('\n')
+      </groovy>
+      
+      
+      <copy file="src/main/resources/timestamp/run-start.properties" todir="${spec.install.dir}/output/${org.spec.internal.runId}">
+         <filterchain>
+            <expandproperties />
+         </filterchain>
+      </copy-->
+      
+      <parallel failonany="true">
+         <echo>starting Controller</echo>
+
+         <sshexec host="${benchmark.client.01.host}"
+                     username="${benchmark.client.01.username}"
+                     password="${benchmark.client.01.password}"
+                     command="${start.controller.command}"/>
+         <echo>start satellite1</echo>
+         <sshexec host="${benchmark.client.01.host}"
+            username="${benchmark.client.01.username}"
+            password="${benchmark.client.01.password}"
+            command="${start.satellite.one}"/>
+         <echo>start satellite2</echo>
+         <sshexec host="${benchmark.client.02.host}"
+            username="${benchmark.client.02.username}"
+            password="${benchmark.client.02.password}"
+            command="${start.satellite.two}"/>
+         <echo>start satellite3</echo>
+         <sshexec host="${benchmark.client.03.host}"
+            username="${benchmark.client.03.username}"
+            password="${benchmark.client.03.password}"
+            command="${start.satellite.three}"/>
+        <echo>start satellite4</echo>
+        <sshexec host="${benchmark.client.04.host}"
+           username="${benchmark.client.04.username}"
+           password="${benchmark.client.04.password}"
+           command="${start.satellite.four}"/>
+            
+      </parallel>
+      <sleep seconds="${wait.benchmark.startup.period.inSeconds}"/>
+
+   </target>
+   
+   <target name="gather-logs">
+      <echo>Gathering log files</echo>
+      <parallel failonany="false">
+         <scp remotefile="${eap.server.username}@${eap.server.host}:${server.deployment.dir}/server/production/log/jstat-hornetq.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/jstat-hornetq.txt" failonerror="false" password="${eap.server.password}"/>
+         <scp remotefile="${eap.server.username}@${eap.server.host}:/tmp/verbose-gc.txt" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt" failonerror="false" password="${eap.server.password}"/>
+         <scp remotefile="${eap.server.username}@${eap.server.host}:${server.deployment.dir}/server/production/log/server.log" localTodir="${spec.install.dir}/output/${org.spec.internal.runId}/config/server.log" failonerror="false" password="${eap.server.password}"/>
+      </parallel>
+   </target>
+   
+   <target name="process-gc-stats">
+      <echo>Processing gc stats</echo>
+      <if>
+         <available file="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt"/>
+         <then>
+            <exec executable="printgcstats" output="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc-stats.txt" failonerror="false">
+               <arg value="-v"/>
+               <arg value="cpus=16"/>
+               <arg value="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt"/>
+            </exec>
+         </then>
+      </if>
+      
+   </target>
+   
+   <target name="verify-log-collection">
+      <echo>Verifying all the collected files are present.</echo>
+      <condition property="log-collection.isValid" else="false">
+         <and>
+            <available file="${spec.install.dir}/output/${org.spec.internal.runId}/config/run.conf"/>
+            <available file="${spec.install.dir}/output/${org.spec.internal.runId}/config/jstat-hornetq.txt"/>
+            <available file="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc.txt"/>
+            <available file="${spec.install.dir}/output/${org.spec.internal.runId}/config/verbose-gc-stats.txt"/>
+         </and>
+      </condition>
+      <echo>Status of check is: ${log-collection.isValid}</echo>
+   </target>
+   
+   <target name="submission-preparation">
+      <echo message="Preparing the submission files with values used during the benchmark run."/>
+      <loadproperties srcFile="${spec.install.dir}/output/${org.spec.internal.runId}/config/run.conf">
+         <filterchain>
+            <striplinecomments>
+               <comment value="#"/>
+               <comment value="if"/>
+            </striplinecomments>
+            <tokenfilter>
+                <replacestring from="   " to=""/>
+            </tokenfilter>
+            <linecontains>
+              <contains value="JAVA_OPTS"/>
+            </linecontains>
+            <prefixlines prefix="HORNETQ_OPTIONS."/>
+         </filterchain>
+      </loadproperties>
+      <loadproperties srcFile="${spec.install.dir}/output/${org.spec.internal.runId}/config/agent.properties">
+         <filterchain>
+            <striplinecomments>
+               <comment value="#"/>
+            </striplinecomments>
+            <prefixlines prefix="AGENT_OPTIONS."/>
+         </filterchain>
+      </loadproperties>
+      <!-- Use property expansion to fill in the gaps in the template submission document. -->
+      <copy file="../submission/submission.xml" todir="${spec.install.dir}/submission">
+         <filterchain>
+            <expandproperties />
+         </filterchain>
+      </copy>
+   </target>
+
+   <target name="generate-submission" depends="submission-preparation">
+      <echo>Checking success of the benchmark run.</echo>
+      
+      <if>
+         <available file="${spec.install.dir}/output/${org.spec.internal.runId}/specjms-result.xml"/>
+         <then>
+            <xmltask source="${spec.install.dir}/output/${org.spec.internal.runId}/specjms-result.xml">
+               <copy path="/specjms-result/test/@result" property="benchmark.run.pass" attrValue="true"/>
+            </xmltask>
+         </then>
+         <else>
+            <property name="benchmark.run.pass" value="false"/>
+         </else>
+      </if>
+      
+      <echo>Status of run was: ${benchmark.run.pass}</echo>
+      
+      <antcall target="generate-submission-report"/>
+      
+   </target>
+   
+   <target name="generate-submission-report">
+      <if>
+         <equals arg1="true" arg2="${benchmark.run.pass}"/>
+         <then>
+            <echo>Generating submission</echo>
+            <ant antfile="${spec.install.dir}/build.xml" target="reporter" dir="${spec.install.dir}">
+               <property name="runOutputDir" value="${spec.install.dir}/output/${org.spec.internal.runId}"/>
+            </ant>
+            
+            <echo>Copying the generated submission to the output directory.</echo>
+            <copy todir="${spec.install.dir}/output/${org.spec.internal.runId}" >
+               <fileset dir="${spec.install.dir}/submission"/>
+            </copy>
+         </then>
+      </if>
+   </target>
+   
+   <target name="substitute-remote-config">
+      <echo>Checking for replacement remote configuration.</echo>
+      
+      <condition property="replacement.file.exists" else="false">
+         <and>
+            <isset property="replacement.file.source.name"/>
+            <isset property="replacement.file.target.name"/>
+            <available file="${replacement.file.source.name}"/>
+         </and>
+      </condition>
+      
+      <echo>Status of all expected properties and files: ${replacement.file.exists}</echo>
+      <antcall target="replace-remote-file" inheritall="true"/>
+      
+   </target>
+   
+   <target name="replace-remote-file">
+      <if>
+         <equals arg1="true" arg2="${replacement.file.exists}"/>
+         <then>
+            <echo>Replacing file ${replacement.file.source.name} </echo>
+            <scp localFile="${replacement.file.source.name}" remoteTofile="${eap.server.username}@${eap.server.host}:${replacement.file.target.name}"  failonerror="true" password="${eap.server.password}" />
+         </then>
+         <else>
+            <echo>No replacement of remote file.</echo>
+         </else>
+      </if>
+   </target>
+   
+   <target name="delete-remote-config">
+      <echo>Checking for delete remote file.</echo>
+      
+      <condition property="remove.file.property.exists" else="false">
+         <and>
+            <isset property="remove.file.name"/>
+         </and>
+      </condition>
+      
+      <echo>Status of all expected property : ${remove.file.property.exists}</echo>
+      <antcall target="delete-remote-file" inheritall="true"/>
+      
+   </target>
+   
+   <target name="delete-remote-file">
+      
+      <if>
+         <equals arg1="true" arg2="${remove.file.property.exists}"/>
+         <then>
+            <echo>Removing file ${remove.file.name} </echo>
+            <sshexec host="${eap.server.host}" username="${eap.server.username}" password="${eap.server.password}" command="rm -f ${remove.file.name}" />
+         </then>
+         <else>
+            <echo>No deletion of remote file.</echo>
+         </else>
+      </if>
+   </target>
+   
+   <target name="substitute-local-config">
+      <echo>Checking for configuration to replace local file.</echo>
+      
+      <condition property="replacement.file.exists" else="false">
+         <and>
+            <isset property="replacement.file.source.name"/>
+            <isset property="replacement.file.target.name"/>
+            <available file="${replacement.file.source.name}"/>
+         </and>
+      </condition>
+      
+      <echo>Status of all expected properties and files: ${replacement.file.exists}</echo>
+      <antcall target="replace-local-file" inheritall="true"/>
+      
+   </target>
+   
+   <target name="replace-local-file">
+      <if>
+         <equals arg1="true" arg2="${replacement.file.exists}"/>
+         <then>
+            <echo>Replacing file ${replacement.file.target.name} </echo>
+            <copy file="${replacement.file.source.name}" tofile="${replacement.file.target.name}" overwrite="true"/>
+         </then>
+         <else>
+            <echo>No replacement of local file.</echo>
+         </else>
+      </if>
+   </target>
+   
+   <target name="deploy-payload">
+      <echo>Checking the payload directory [${payload.dir}] is present.</echo>
+      <condition property="payload.directory.isAvailable" else="false" value="true">
+         <and>
+            <isset property="payload.dir"/>
+            <available file="${payload.dir}"/>
+      </and>
+      </condition>
+      <echo>Status of expected property and directory: ${payload.directory.isAvailable}</echo>
+      <antcall target="deploy.files" inheritall="true"/>
+   </target>
+      
+   <target name="deploy.files">
+      <if>
+         <equals arg1="true" arg2="${payload.directory.isAvailable}"/>
+         <then>
+            <echo>Deploying files.</echo>
+            <touch>
+               <fileset dir="${payload.dir}"/>
+            </touch>
+            
+            <if>
+               <available file="${payload.dir}/run.conf"/>
+               <then>
+               <echo>Deploying run.conf</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/run.conf"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/bin/run.conf"/>
+                  </antcall>
+               </then>
+            </if>
+               
+            <if>
+               <available file="${payload.dir}/libHornetQAIO64.so"/>
+               <then>
+                  <echo>Deploying libHornetQAIO64.so</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/libHornetQAIO64.so"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/native/lib64/libHornetQAIO64.so"/>
+                  </antcall>
+               </then>
+            </if>
+            
+            <if>
+               <available file="${payload.dir}/hornetq-jms.xml"/>
+               <then>
+                  <echo>Deploying hornetq-jms.xml</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/hornetq-jms.xml"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/server/production/deploy/hornetq/hornetq-jms.xml"/>
+                  </antcall>
+               </then>
+            </if>
+         	
+         	<if>
+               <available file="${payload.dir}/hornetq-configuration.xml"/>
+               <then>
+                  <echo>Deploying hornetq-jms.xml</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/hornetq-configuration.xml"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/server/production/deploy/hornetq/hornetq-configuration.xml"/>
+                  </antcall>
+               </then>
+            </if>
+         	
+         	<if>
+               <available file="${payload.dir}/jms-ds.xml"/>
+               <then>
+                  <echo>Deploying jms-ds.xml</echo>
+                  <antcall target="substitute-remote-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/jms-ds.xml"/>
+                     <param name="replacement.file.target.name" value= "${server.deployment.dir}/server/production/deploy/hornetq/jms-ds.xml"/>
+                  </antcall>
+               </then>
+            </if>
+            
+            <if>
+               <available file="${payload.dir}/build-commands.properties"/>
+               <then>
+                  <echo>Deploying build-commands.properties</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/build-commands.properties"/>
+                     <param name="replacement.file.target.name" value= "java/batch-execution-SPEC-jms2007/scripts/build-commands.properties"/>
+                  </antcall>
+               </then>
+            </if>
+
+            <if>
+               <available file="${payload.dir}/run.properties"/>
+               <then>
+                  <echo>Deploying run.properties</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/run.properties"/>
+                     <param name="replacement.file.target.name" value= "${spec.install.dir}/config/run.properties"/>
+                  </antcall>
+               </then>
+            </if>
+                     
+            <if>
+               <available file="${payload.dir}/horizontal.properties"/>
+               <then>
+                  <echo>Deploying horizontal.properties</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/horizontal.properties"/>
+                     <param name="replacement.file.target.name" value= "${spec.install.dir}/config/horizontal.properties"/>
+                  </antcall>
+               </then>
+            </if>
+         	
+         	<if>
+               <available file="${payload.dir}/hornetq.env"/>
+               <then>
+                  <echo>Deploying horizontal.properties</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/hornetq.env"/>
+                     <param name="replacement.file.target.name" value= "${spec.install.dir}/config/hornetq.env"/>
+                  </antcall>
+               </then>
+            </if>
+            
+            <if>
+               <available file="${payload.dir}/vertical.properties"/>
+               <then>
+                  <echo>Deploying vertical.properties</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/vertical.properties"/>
+                     <param name="replacement.file.target.name" value= "${spec.install.dir}/config/vertical.properties"/>
+                  </antcall>
+               </then>
+            </if>
+            
+            <if>
+               <available file="${payload.dir}/specjms.seq"/>
+               <then>
+                  <echo>Deploying specjms.seq</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/specjms.seq"/>
+                     <param name="replacement.file.target.name" value= "${user.home}/.specjms/specjms.seq"/>
+                  </antcall>
+               </then>
+            </if>
+            
+            <if>
+               <available file="${payload.dir}/default.env"/>
+               <then>
+                  <echo>Deploying default.env</echo>
+                  <antcall target="substitute-local-config">
+                     <param name="replacement.file.source.name" value= "${payload.dir}/default.env"/>
+                     <param name="replacement.file.target.name" value= "${spec.install.dir}/config/default.env"/>
+                  </antcall>
+               </then>
+            </if>
+               
+         </then>
+         <else>
+            <echo>Not going to deploy files.</echo>
+         </else>
+      </if>
+   </target>
+   
+   <target name="wait-for-benchmark-completion">
+      <echo>Checking to see if benchmark has completed.</echo>
+      <antcall target="check-and-wait">
+         <param name="pid.process.name" value="${benchmark.process.name}"/>
+         <param name="wait.period.inMilliSeconds" value="${completion.wait.period.inMilliSeconds}"/>
+      </antcall>
+   </target>
+
+   <target name="prepare-execution-report">
+      <echo>Preparing benchmark run results.</echo>
+      
+      <if>
+         <available file="${payload.dir}/execution-workload.xml" />
+         <then> 
+            <property name="execution-type" value="circular"/>
+         </then>
+         <else>
+            <property name="execution-type" value="linear"/>
+         </else>
+      </if>
+      <property file="${spec.install.dir}/output/${org.spec.internal.runId}/run-start.properties"/>
+      
+      <xslt style="src/main/resources/xsl/result.xsl" in="build.xml" out="${temporary.directory}/execution-result-report.xml">
+         <param name="controller-id" value="null"/>
+         <param name="worker-id" value="AFTER_EXECUTION.org.spec.internal.runId"/>
+         <param name="type" value="${execution-type}"/>
+         <param name="start-datetime" value="${start.timestamp}"/><!-- relies on run-start.properties -->
+         <param name="start-jdatetime" value=""/>
+         <param name="completion-datetime" value=""/>
+         <param name="completion-jdatetime" value=""/>
+         <param name="duration" value=""/>
+         <param name="application-name" value="SPECjms2007"/>
+      </xslt>
+      <xslt style="src/main/resources/xsl/data.xsl" in="build.xml" out="${temporary.directory}/execution-result-data.xml"/>
+      
+      <property file="${framework.file}" prefix="AFTER_EXECUTION"/>
+      <if>
+         <equals arg1="${org.spec.internal.runId}" arg2="${AFTER_EXECUTION.org.spec.internal.runId}"/>
+         <then> 
+            <echo message="Something went wrong."/>
+         </then>
+         <else>
+            <copy file="${temporary.directory}/execution-result-report.xml" todir="${spec.install.dir}/output/${org.spec.internal.runId}"/>
+            <copy file="${temporary.directory}/execution-result-data.xml" todir="${spec.install.dir}/output/${org.spec.internal.runId}"/>
+         </else>
+      </if>
+   </target>
+   
+   <target name="send-execution-report">
+      <echo>Sending the result files.</echo>
+      
+   </target>
+   
+   <target name="generate-jms-configuration">
+      <java dir="${spec.install.dir}" classpathref="spec.classpath" fork="true" classname="org.spec.jms.setup.Main" output="${jms.raw.file}">
+         <arg value="-hp=${spec.install.dir}/config/agent.properties" />
+         <sysproperty key="java.compiler" value="jitc" />
+      </java>
+      <loadfile srcfile="${jms.raw.file}" property="jms.configuration.raw">
+         <filterchain>
+            <striplinebreaks/>
+         </filterchain>
+      </loadfile>
+      <groovy>
+         import org.apache.commons.lang.StringUtils;
+         def jmsFile = new File("${properties['jms.output.file']}")
+         def property = { String search, String text ->  text + "=" + StringUtils.countMatches( search, text) + '\n' }
+         raw = "${properties['jms.configuration.raw']}"
+         jmsFile.write("")
+         jmsFile.append(property( raw, "HQ_SMStatsQ"))
+         jmsFile.append(property( raw, "HQ_OrderDCStatsQ"))
+         jmsFile.append(property( raw, "HQ_ShipDCStatsQ"))
+         jmsFile.append(property( raw, "HQ_InvoiceQ"))
+         jmsFile.append(property( raw, "HQ_CreditCardHLT"))
+         jmsFile.append(property( raw, "HQ_ProductAnnouncementT"))
+         jmsFile.append(property( raw, "HQ_PriceUpdateT"))
+         jmsFile.append(property( raw, "HQ_ProductFamilyT"))
+         jmsFile.append(property( raw, "SP_PShipConfQ"))
+         jmsFile.append(property( raw, "SP_POrderQ"))
+         jmsFile.append(property( raw, "SM_OrderConfQ"))
+         jmsFile.append(property( raw, "SM_ShipArrQ"))
+         jmsFile.append(property( raw, "SM_InvMovementQ"))
+         jmsFile.append(property( raw, "DC_OrderQ"))
+         jmsFile.append(property( raw, "DC_ShipDepQ"))
+         jmsFile.append(property( raw, "DC_PShipArrQ"))
+         jmsFile.append(property( raw, "DC_ShipConfQ"))
+         jmsFile.append(property( raw, "DC_POrderConfQ"))
+         jmsFile.append(property( raw, "DC_IncomingOffersQ"))
+      </groovy>
+      <loadproperties srcfile="${jms.output.file}"/>
+      
+      <if>
+         <equals arg1="${org.spec.jms.files.vendor}" arg2="hornetq.properties"/>
+         <then>
+         	<xslt in="../build.xml" style="../src/main/resources/xsl/jms-config-hornetq.xsl" out="${spec.install.dir}/config/hornetq-jms.xml">
+			  <param name="HQ_SMStatsQ" expression="${HQ_SMStatsQ}"/>
+			  <param name="HQ_OrderDCStatsQ" expression="${HQ_OrderDCStatsQ}"/>
+			  <param name="HQ_ShipDCStatsQ" expression="${HQ_ShipDCStatsQ}"/>
+			  <param name="HQ_InvoiceQ" expression="${HQ_InvoiceQ}"/>
+			  <param name="HQ_CreditCardHLT" expression="${HQ_CreditCardHLT}"/>
+			  <param name="HQ_ProductAnnouncementT" expression="${HQ_ProductAnnouncementT}"/>
+			  <param name="HQ_PriceUpdateT" expression="${HQ_PriceUpdateT}"/>
+			  <param name="HQ_ProductFamilyT" expression="${HQ_ProductFamilyT}"/>
+			  <param name="SP_PShipConfQ" expression="${SP_PShipConfQ}"/>
+			  <param name="SP_POrderQ" expression="${SP_POrderQ}"/>
+			  <param name="SM_OrderConfQ" expression="${SM_OrderConfQ}"/>
+			  <param name="SM_ShipArrQ" expression="${SM_ShipArrQ}"/>
+			  <param name="SM_InvMovementQ" expression="${SM_InvMovementQ}"/>
+			  <param name="DC_OrderQ" expression="${DC_OrderQ}"/>
+			  <param name="DC_ShipDepQ" expression="${DC_ShipDepQ}"/>
+			  <param name="DC_PShipArrQ" expression="${DC_PShipArrQ}"/>
+			  <param name="DC_ShipConfQ" expression="${DC_ShipConfQ}"/>
+			  <param name="DC_POrderConfQ" expression="${DC_IncomingOffersQ}"/>
+			  <param name="DC_IncomingOffersQ" expression="${DC_IncomingOffersQ}"/>
+           </xslt>
+         </then>
+         <elseif>
+            <equals arg1="${org.spec.jms.files.vendor}" arg2="jbm.properties"/>
+            <then>
+               <xslt in="../build.xml" style="../src/main/resources/xsl/jms-config-jbm.xsl" out="${spec.install.dir}/config/destinations-service.xml">
+                  <param name="HQ_SMStatsQ" expression="${HQ_SMStatsQ}"/>
+                  <param name="HQ_OrderDCStatsQ" expression="${HQ_OrderDCStatsQ}"/>
+                  <param name="HQ_ShipDCStatsQ" expression="${HQ_ShipDCStatsQ}"/>
+                  <param name="HQ_InvoiceQ" expression="${HQ_InvoiceQ}"/>
+                  <param name="HQ_CreditCardHLT" expression="${HQ_CreditCardHLT}"/>
+                  <param name="HQ_ProductAnnouncementT" expression="${HQ_ProductAnnouncementT}"/>
+                  <param name="HQ_PriceUpdateT" expression="${HQ_PriceUpdateT}"/>
+                  <param name="HQ_ProductFamilyT" expression="${HQ_ProductFamilyT}"/>
+                  <param name="SP_PShipConfQ" expression="${SP_PShipConfQ}"/>
+                  <param name="SP_POrderQ" expression="${SP_POrderQ}"/>
+                  <param name="SM_OrderConfQ" expression="${SM_OrderConfQ}"/>
+                  <param name="SM_ShipArrQ" expression="${SM_ShipArrQ}"/>
+                  <param name="SM_InvMovementQ" expression="${SM_InvMovementQ}"/>
+                  <param name="DC_OrderQ" expression="${DC_OrderQ}"/>
+                  <param name="DC_ShipDepQ" expression="${DC_ShipDepQ}"/>
+                  <param name="DC_PShipArrQ" expression="${DC_PShipArrQ}"/>
+                  <param name="DC_ShipConfQ" expression="${DC_ShipConfQ}"/>
+                  <param name="DC_POrderConfQ" expression="${DC_IncomingOffersQ}"/>
+                  <param name="DC_IncomingOffersQ" expression="${DC_IncomingOffersQ}"/>
+               </xslt>
+            </then>
+         </elseif>
+      </if>
+   </target>
+   
+   <target name="email">
+      <loadproperties srcfile="email.properties"/>
+      <mail tolist="${ack.to.address}" from="${ack.from.address}" message="Finished" mailhost="${ack.host}" mailport="${ack.port}" subject="SPECjms2007 benchmark status update"/>
+   </target>
+
+   <target name="usage">
+      <echo>usage: Do not call this directly, instead use build-commands</echo>
+   </target>
+
+</project>
\ No newline at end of file



More information about the jboss-svn-commits mailing list