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

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Wed Sep 15 10:27:32 EDT 2010


Author: whitingjr
Date: 2010-09-15 10:27:32 -0400 (Wed, 15 Sep 2010)
New Revision: 35156

Added:
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/email.properties
Modified:
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
   labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-commands.xml
Log:
Added command to email when benchmark is finished.

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml	2010-09-15 13:19:22 UTC (rev 35155)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-api.xml	2010-09-15 14:27:32 UTC (rev 35156)
@@ -34,7 +34,14 @@
    <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" />
+   <!--property file="${spec.install.dir}/config/run.properties" />
    
+   <path id="spec.classpath">
+      <fileset dir="${spec.install.dir}/lib">
+         <include name="*.jar" />
+      </fileset>
+   </path-->
+   
    <target name="clean">
       <echo>Removing prior run collected data.</echo>
       <delete failonerror="false" file="${spec.install.dir}/config/run.conf"/>
@@ -214,12 +221,12 @@
    <target name="generate-submission" depends="submission-preparation">
       <echo>Checking success of the benchmark run.</echo>
       
-        <if>
+      <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>
+            <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"/>
@@ -508,6 +515,85 @@
    <target name="purge-jvm">
    
    </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-jbm.xsl" out="${spec.install.dir}/config/">
+               <param name="jms-configuration-raw" expression="${jms.configuration.raw}"/>
+            </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="Profiling status update"/>
+   </target>
 
    <target name="usage">
       <echo>usage: Do not call this directly, instead use build-commands</echo>

Modified: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-commands.xml
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-commands.xml	2010-09-15 13:19:22 UTC (rev 35155)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/build-commands.xml	2010-09-15 14:27:32 UTC (rev 35156)
@@ -17,7 +17,7 @@
 
    <property file="build-commands.properties" />
    
-	<target name="benchmark" >
+	<target name="benchmark">
 		<echo>Preparing for a benchmark run.</echo>
 	   <input message="Enter root password for servers:" addproperty="r_p" />
 		<ant antfile="build-api.xml" target="prepare-eap-server"/>
@@ -28,6 +28,8 @@
 	   <ant antfile="build-api.xml" target="gather-logs"/>
 	   <ant antfile="build-api.xml" target="process-gc-stats"/>
 	   <ant antfile="build-api.xml" target="verify-log-collection"/>
+	   <!--ant antfile="build-api.xml" target="prepare-execution-report"/>
+	   <ant antfile="build-api.xml" target="send-execution-report"/-->
 	</target>
    
    <target name="substitute-remote-config">
@@ -50,5 +52,7 @@
 		<message echo="usage: ant -buildfile build-commands.xml task-name"/>
 	</target>
 	
-
+   <target name="notify">
+      <ant antfile="build-api.xml" target="email" inheritall="true"/>
+   </target>
 </project>
\ No newline at end of file

Added: labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/email.properties
===================================================================
--- labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/email.properties	                        (rev 0)
+++ labs/jbosstm/workspace/whitingjr/sandbox/batch-execution-SPEC-jms2007/scripts/email.properties	2010-09-15 14:27:32 UTC (rev 35156)
@@ -0,0 +1,4 @@
+ack.to.address=whitingjr at hotmail.com
+ack.from.address=jwhiting at redhat.com
+ack.host=10.11.255.199
+ack.port=587
\ No newline at end of file



More information about the jboss-svn-commits mailing list