Modified: 
incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/pom.xml
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/pom.xml?view=diff&rev=504056&r1=504055&r2=504056
==============================================================================
--- incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/pom.xml 
(original)
+++ incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/pom.xml 
Tue Feb  6 01:57:35 2007
@@ -19,6 +19,7 @@
 <project xmlns="http://maven.apache.org/POM/4.0.0";
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+
     <modelVersion>4.0.0</modelVersion>
     <groupId>org.apache.qpid</groupId>
     <artifactId>qpid-perftests</artifactId>
@@ -35,9 +36,33 @@
 
     <properties>
         <topDirectoryLocation>..</topDirectoryLocation>
-       <log4j.perftests>perftests.log4j</log4j.perftests>
+        <log4j.perftests>perftests.log4j</log4j.perftests>
     </properties>
 
+    <!-- Temporary local maven repo, whilst JUnit Toolkit is still reaching 
stable version to add to central maven repository. -->
+    <repositories>
+        <repository>
+          <id>junit-toolkit.snapshots</id>
+          <name>JUnit Toolkit SNAPSHOT Repository</name>
+         
<url>http://junit-toolkit.svn.sourceforge.net/svnroot/junit-toolkit/snapshots/</url>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </repository>
+    </repositories>
+
+    <!-- Temporary local maven repo, whilst JUnit Toolkit is still reaching 
stable version to add to central maven repository. -->
+    <pluginRepositories>
+        <pluginRepository>
+          <id>junit-toolkit-plugin.snapshots</id>
+          <name>JUnit Toolkit SNAPSHOT Repository</name>
+         
<url>http://junit-toolkit.svn.sourceforge.net/svnroot/junit-toolkit/snapshots/</url>
+          <snapshots>
+            <enabled>true</enabled>
+          </snapshots>
+        </pluginRepository>
+    </pluginRepositories>
+
     <dependencies>
 
         <dependency>
@@ -50,15 +75,15 @@
             <artifactId>log4j</artifactId>
         </dependency>
 
-        <!-- Test dependencies. -->
         <dependency>
-            <groupId>junit</groupId>
-            <artifactId>junit</artifactId>
+            <groupId>uk.co.thebadgerset</groupId>
+            <artifactId>junit-toolkit</artifactId>
         </dependency>
 
+        <!-- Test dependencies. -->
         <dependency>
-            <groupId>uk.co.thebadgerset</groupId>
-            <artifactId>junit-toolkit</artifactId>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
         </dependency>
 
     </dependencies>
@@ -72,45 +97,41 @@
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <!--<skip>true</skip>-->
-                </configuration>
             </plugin>
 
-            <!-- The JUnit Toolkit maven2 plugin is in the process of being 
added to the maven repository. It will take a day or two from 16/1/2007.
+            <!-- The JUnit Toolkit maven2 plugin is in the process of being 
added to the maven repository.
 
-                Configures the toolkit test runner for performance testing. 
These can be run from within maven, or by using the generated
+                 Configures the toolkit test runner for performance testing. 
These can be run from within maven, or by using the generated
                  scripts.
 
-                To run from maven:
+                 To run from within maven:
 
-                mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tktest
+                 mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tktest
 
-                To run from the command line (after doing assembly:assembly 
goal):
+                 To run from the command line (after doing assembly:assembly 
goal):
 
-                java -cp target/test_jar-jar-with-dependencies.jar 
uk.co.thebadgerset.junit.extensions.TKTestRunner -s 1 -r 100000 -o target 
org.apache.qpid.requestreply.PingPongTestPerf
+                 java -cp target/test_jar-jar-with-dependencies.jar 
uk.co.thebadgerset.junit.extensions.TKTestRunner -s 1 -r 100000 
+                      -o target org.apache.qpid.requestreply.PingPongTestPerf
 
-                To generate the scripts do:
+                 To generate the scripts do:
 
-                mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tkscriptgen
+                 mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tkscriptgen
 
-                Then to run the scripts do (after doing assembly:assembly 
goal):
+                 Then to run the scripts, in the target directory do (after 
doing assembly:assembly goal):
 
-                ./bin/script_name or ./bin/script_name.bat
+                 ./script_name.sh
 
-                These scripts can find everything in the 'all test 
dependencies' jar created by the assembly:assembly goal.
-                -->
-<!--
+                 These scripts can find everything in the 'all test 
dependencies' jar created by the assembly:assembly goal.
+                 -->
             <plugin>
               <groupId>uk.co.thebadgerset</groupId>
               <artifactId>junit-toolkit-maven-plugin</artifactId>
-              <version>0.3</version>
 
               <configuration>
-               <scriptOutDirectory>target</scriptOutDirectory>
-               <testJar>${project.build.finalName}-all-test-deps.jar</testJar>
+                <scriptOutDirectory>target</scriptOutDirectory>
+                <testJar>${project.build.finalName}-all-test-deps.jar</testJar>
 
-               <systemproperties>
+                <systemproperties>
                   <property>
                     <name>log4j.configuration</name>
                     <value>${log4j.perftests}</value>
@@ -119,7 +140,7 @@
                     <name>amqj.logging.level</name>
                     <value>warn</value>
                   </property>
-                  <property>
+                  <property><!-- Turn off most logging messages from the 
junit-toolkit test tool itself. -->
                     <name>badger.level</name>
                     <value>warn</value>
                   </property>
@@ -127,148 +148,45 @@
                     <name>amqj.test.logging.level</name>
                     <value>info</value>
                   </property>
-          </systemproperties>
+                </systemproperties>
 
                 <commands>
-                  <!## Run the ping pong test once. This is just to check 
toolkit test runner is working. Real tests follow. ##>
-                  <PingOnce>-n PingOnce -s [1] -r 1 -t testPingOk -o . 
org.apache.qpid.ping.PingTestPerf</PingOnce>
-
-          <!## Tests the accuracy of the throttle implementation at different 
speeds. Throttle is used to restrict message rate in some tsts. ##>
-                 <ThrottleTest>-n ThrottleTest -r 5 -s 
[10,10000],samples=100,exp -t testThrottle -o . 
org.apache.qpid.ping.ThrottleTestPerf</ThrottleTest>
-
-          <!##
-                    Skim Tests.
-                    These are not part of the performance suite. They run 
quick tests to check that the different combinations of
-                    options that the performance suite uses are going to work.
-            ##>
-                 <Skim-Tx>-n Skim-Tx -s [1000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf transacted=true</Skim-Tx>
-                 <Skim-Size>-n Skim-Size -s [1000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf messagesize=51200</Skim-Size>
-                 <Skim-Many>-n Skim-Many -s [1] -c [4] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf</Skim-Many>
-                 <Skim-Queues>-n Skim-Queues -s [1000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf destinationcount=10</Skim-Queues>
-                 <Skim-Duration>-n Skim-Duration -s [1000] -d10S -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf</Skim-Duration>
-                 <Skim-Rate>-n Skim-Rate -s [1000] -d10S -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf rate=100</Skim-Rate>
-
-          <!## P2P Volume Tests. ##>
-                 <VT-Qpid-1>-n VT-Qpid-1 -s [15000000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true BatchSize=10000 
CommitBatchSize=20000 transacted=true</VT-Qpid-1>
-                 <VT-Qpid-2>-n VT-Qpid-2 -s [15000000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true BatchSize=10000</VT-Qpid-2>
-          <!## Setting sample to 3,000,000 will result in a log entry every 10 
minutes so should have 144 data points for the run. ##>
-          <VT-Qpid-3>-n VT-Qpid-3 -s [3000000] -d 24H -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true rate=10000 BatchSize=3000000 
CommitBatchSize=40000 transacted=true</VT-Qpid-3>
-                 <VT-Qpid-4>-n VT-Qpid-4 -s [3000000] -d 24H -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true rate=10000 
BatchSize=3000000</VT-Qpid-4>
-
-          <!## P2P Scalability Tests. ##>
-                 <!## 250,000 Total, 1P-1T-1C ##>
-                 <PT-Qpid-1>-n PT-Qpid-1 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true CommitBatchSize=20000 
transacted=true</PT-Qpid-1>
-                 <PT-Qpid-2>-n PT-Qpid-2 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true </PT-Qpid-2>
-
-                 <!## 25000 Msgs * 10 Brokers = 250,000 Total, 10P-1Q-10C ##>
-                 <PT-Qpid-3>-n PT-Qpid-3 -s [25000] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
transacted=true CommitBatchSize=20000</PT-Qpid-3>
-                 <PT-Qpid-4>-n PT-Qpid-4 -s [25000] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true </PT-Qpid-4>
-
-             <!## 25000 Msgs * 10 Brokers = 250,000 Tota,l 10P-10T-10C 
10*(1P-1Q-1C) ##>
-                 <PT-Qpid-5>-n PT-Qpid-5 -s [25000] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
destinationcount=1 transacted=true</PT-Qpid-5>
-                 <PT-Qpid-6>-n PT-Qpid-6 -s [25000] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
destinationcount=1</PT-Qpid-6>
-
-             <!## 2500 Msgs * 10 Brokers * 10 Topics/Clients = 250,000 Total, 
10P-100T-10C 10*(1P-10T-1C) ##>
-                 <PT-Qpid-7>-n PT-Qpid-7 -s [2500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
destinationcount=10 transacted=true</PT-Qpid-7>
-                 <PT-Qpid-8>-n PT-Qpid-8 -s [2500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
destinationcount=10</PT-Qpid-8>
-
-                 <!## 2500 Msgs * 100 Brokers = 250,000 Total, 100P-100T-100C 
100*(1P-1T-1C) ##>                 
-                 <PT-Qpid-9>-n PT-Qpid-9 -s [2500] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=1 transacted=true CommitBatchSize=500</PT-Qpid-9>
-                 <PT-Qpid-10>-n PT-Qpid-10 -s [2500] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=1</PT-Qpid-10> 
-
-                 <!## 250 Msgs * 100 Brokers * 10 Clients = 250,000 Total, 
100P-1000T-100C 100*(1P-10T-1C)  ##>                  
-                 <PT-Qpid-11>-n PT-Qpid-11 -s [250] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=10 transacted=true 
CommitBatchSize=50</PT-Qpid-11>
-                 <PT-Qpid-12>-n PT-Qpid-12 -s [250] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=10</PT-Qpid-12>
-
-                 <!## 250 Msgs * 1000 Brokers = 250,000 Total, 
1000P-1000T-1000C 1000*(1P-1T-1C) ##>
-                 <PT-Qpid-13>-n PT-Qpid-13 -s [250] -c[1000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=1 transacted=true CommitBatchSize=50</PT-Qpid-13>
-                 <PT-Qpid-14>-n PT-Qpid-14 -s [250] -c[1000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=250 destinationcount=1</PT-Qpid-14>
-
-                 <!## P2P Volume Tests. ##>
-                 <VQ-Qpid-1>-n VQ-Qpid-1 -s [900000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 transacted=true 
CommitBatchSize=40000</VQ-Qpid-1>
-                 <VQ-Qpid-2>-n VQ-Qpid-2 -s [900000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000</VQ-Qpid-2>
-          <!## Setting sample to 3,000,000 will result in a log entry every 10 
minutes so should have 144 data points for the run. ##>
-                 <VQ-Qpid-3>-n VQ-Qpid-3 -s [3000000] -d 24H -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf rate=10000 
BatchSize=3000000 transacted=true CommitBatchSize=40000</VQ-Qpid-3>
-                 <VQ-Qpid-4>-n VQ-Qpid-4 -s [3000000] -d 24H -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf rate=10000 
BatchSize=3000000 </VQ-Qpid-4>
-
-                 <!## P2P Scalability Tests. ##>
-                 <!## 15,000 Total, 1P-1Q-1C ##>
-                 <PQ-Qpid-1>-n PQ-Qpid-1 -s [15000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf transacted=true</PQ-Qpid-1>
-                 <PQ-Qpid-2>-n PQ-Qpid-2 -s [15000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf</PQ-Qpid-2>
-
-                 <!## 1500 Messages * 10 Brokers = 15,000 Total, 10P-1Q-10C ##>
-                 <PQ-Qpid-3>-n PQ-Qpid-3 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationname=ping transacted=true CommitBatchSize=500</PQ-Qpid-3>
-                 <PQ-Qpid-4>-n PQ-Qpid-4 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationname=ping</PQ-Qpid-4>
-
-                 <!## 1500 Messages * 10 Brokers = 15,000 Total, 10P-10Q-10C 
10*(1P-1Q-1C) ##>
-                 <PQ-Qpid-5>-n PQ-Qpid-5 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=1 transacted=true CommitBatchSize=500</PQ-Qpid-5>
-                 <PQ-Qpid-6>-n PQ-Qpid-6 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=1</PQ-Qpid-6>
-       
-                 <!## 1500 Messages * 10 Brokers = 15,000 Total, 10P-100Q-10C 
10*(1P-10Q-1C) ##>
-                 <PQ-Qpid-7>-n PQ-Qpid-7 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=10 transacted=true CommitBatchSize=500</PQ-Qpid-7>
-                 <PQ-Qpid-8>-n PQ-Qpid-8 -s [1500] -c[10] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=10</PQ-Qpid-8>
-
-                 <!## 150 Messages * 100 Brokers = 15,000 Total, 
100P-100Q-100C 100*(1P-1Q-1C) ##>
-                 <PQ-Qpid-9>-n PQ-Qpid-9 -s [150] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=50 
destinationcount=1 transacted=true CommitBatchSize=50</PQ-Qpid-9>
-                 <PQ-Qpid-10>-n PQ-Qpid-10 -s [150] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=50 
destinationcount=1 </PQ-Qpid-10>
-
-                 <!## 150 Messages * 100 Brokers = 15,000 Total, 
100P-1000Q-100C 100*(1P-10Q-1C) ##>
-                 <PQ-Qpid-11>-n PQ-Qpid-11 -s [150] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=10 transacted=true CommitBatchSize=50</PQ-Qpid-11>
-                 <PQ-Qpid-12>-n PQ-Qpid-12 -s [150] -c[100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=100 
destinationcount=10</PQ-Qpid-12>
-                 
-                 <!## 15 Messages * 1000 Brokers = 15,000 Total, 
1000P-1000Q-1000C 1000*(1P-1Q-1C) ##>
-                 <PQ-Qpid-13>-n PQ-Qpid-13 -s [15] -c[1000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=15 
transacted=true CommitBatchSize=15</PQ-Qpid-13>
-                 <PQ-Qpid-14>-n PQ-Qpid-14 -s [15] -c[1000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=15 
</PQ-Qpid-14>
-
-          <!## Increasing Message Payload Tests. ##>
-                 <!## Queue Testing ##>
-                 <LT-Qpid-1-512b>-n LT-Qpid-1-512b -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=512 transacted=true 
CommitBatchSize=10000</LT-Qpid-1-512b>
-                 <LT-Qpid-2-512b>-n LT-Qpid-2-512b -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=512</LT-Qpid-2-512b>
-
-                 <LT-Qpid-1-1K>-n LT-Qpid-1-1K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 transacted=true CommitBatchSize=10000</LT-Qpid-1-1K>
-                 <LT-Qpid-2-1K>-n LT-Qpid-2-1K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000</LT-Qpid-2-1K>
-
-                 <LT-Qpid-1-5K>-n LT-Qpid-1-5K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=5120 transacted=true 
CommitBatchSize=10000</LT-Qpid-1-5K>
-                 <LT-Qpid-2-5K>-n LT-Qpid-2-5K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=5120</LT-Qpid-2-5K>
-
-                 <LT-Qpid-1-10K>-n LT-Qpid-1-10K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=10240 transacted=true 
CommitBatchSize=10000</LT-Qpid-1-10K>
-                 <LT-Qpid-2-10K>-n LT-Qpid-2-10K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=10240 </LT-Qpid-2-10K>
-
-                 <LT-Qpid-1-50K>-n LT-Qpid-1-50K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=51200 transacted=true 
CommitBatchSize=10000</LT-Qpid-1-50K>
-                 <LT-Qpid-2-50K>-n LT-Qpid-2-50K -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=51200</LT-Qpid-2-50K>
-
-                 <LT-Qpid-1-1M>-n LT-Qpid-1-1M -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=1048576 transacted=true 
CommitBatchSize=10000</LT-Qpid-1-1M>
-                 <LT-Qpid-2-1M>-n LT-Qpid-2-1M -s [1000000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf pubsub=true 
BatchSize=10000 messagesize=1048476</LT-Qpid-2-1M>
-
-                 <!## Topic Testing ##>
-                 <LT-Qpid-3-512b>-n LT-Qpid-3-512b -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=512 transacted=true CommitBatchSize=10000</LT-Qpid-3-512b>
-                 <LT-Qpid-4-512b>-n LT-Qpid-4-512b -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=512</LT-Qpid-4-512b>
-
-                 <LT-Qpid-3-1K>-n LT-Qpid-3-1K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
transacted=true CommitBatchSize=10000</LT-Qpid-3-1K>
-                 <LT-Qpid-4-1K>-n LT-Qpid-4-1K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf 
BatchSize=10000</LT-Qpid-4-1K>
-
-                 <LT-Qpid-3-5K>-n LT-Qpid-3-5K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=5120 transacted=true CommitBatchSize=10000</LT-Qpid-3-5K>
-                 <LT-Qpid-4-5K>-n LT-Qpid-4-5K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=5120</LT-Qpid-4-5K>
-
-                 <LT-Qpid-3-10K>-n LT-Qpid-3-10K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=10240 transacted=true CommitBatchSize=10000</LT-Qpid-3-10K>
-                 <LT-Qpid-4-10K>-n LT-Qpid-4-10K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=10240</LT-Qpid-4-10K>
-
-                 <LT-Qpid-3-50K>-n LT-Qpid-3-50K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=51200 transacted=true CommitBatchSize=10000</LT-Qpid-3-50K>
-                 <LT-Qpid-4-50K>-n LT-Qpid-4-50K -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=51200</LT-Qpid-4-50K>
-
-                 <LT-Qpid-3-1M>-n LT-Qpid-3-1M -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=1048576 transacted=true CommitBatchSize=10000</LT-Qpid-3-1M>
-                 <LT-Qpid-4-1M>-n LT-Qpid-4-1M -s [900000] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
messagesize=1048576 </LT-Qpid-4-1M>
-
-                 <!## Failover Tests. ##>
-                 <!## Transactional ##>
-                 <FT-Qpid-1>-n FT-Qpid-1 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 transacted=true 
CommitBatchSize=10000 broker="tcp://localhost:5001;tcp://localhost:5002" 
FailBeforeSend=true</FT-Qpid-1>
-                 <FT-Qpid-2>-n FT-Qpid-2 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 transacted=true 
CommitBatchSize=10000 broker="tcp://localhost:5001;tcp://localhost:5002" 
FailAfterSend=true</FT-Qpid-2>
-                 <FT-Qpid-3>-n FT-Qpid-3 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 transacted=true 
CommitBatchSize=10000 broker="tcp://localhost:5001;tcp://localhost:5002" 
FailAfterCommit=true</FT-Qpid-3>
-
-                 <!## Non Transactional ##>
-                 <FT-Qpid-4>-n FT-Qpid-4 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
broker="tcp://localhost:5001;tcp://localhost:5002" transacted=false 
FailBeforeSend=true</FT-Qpid-4>
-                 <FT-Qpid-5>-n FT-Qpid-5 -s [250000] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10000 
broker="tcp://localhost:5001;tcp://localhost:5002" transacted=false 
FailAfterSend=true</FT-Qpid-5>
-
+                  <!-- Single pings. These can be scaled up by overriding the 
parameters when calling the test script. -->
+                  <Ping-Once>-n Ping-Once -s [1] -r 1 -t testPingOk -o . 
org.apache.qpid.ping.PingTestPerf</Ping-Once>
+                  <Ping-Once-Async>-n Ping-Once-Async -s [1] -r 1 -t 
testAsyncPingOk -o . org.apache.qpid.ping.PingAsyncTestPerf</Ping-Once-Async>
+                  <Ping-Latency>-n Ping-Latency -s [1000] -d 10S -t 
testPingLatency -o . org.apache.qpid.ping.PingLatencyTestPerf</Ping-Latency>
+
+                  <!-- More example Tests. These are examples to exercise all 
the features of the test harness. Can scale up with option overrides. -->
+                  <Ping-Tx>-n Ping-Tx -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf transacted=true</Ping-Tx>
+                  <Ping-Size>-n Ping-Size -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf messagesize=512</Ping-Size>
+                  <Ping-Concurrent>-n Ping-Concurrent -s [100] -c [4] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf</Ping-Concurrent>
+                  <Ping-Many-Queues>
+                     -n Ping-Many-Queues -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf destinationcount=4
+                 </Ping-Many-Queues>
+                  <Ping-Duration>-n Ping-Duration -s [100] -d10S -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf</Ping-Duration>
+                  <Ping-Rate>-n Ping-Rate -s [100] -d10S -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf rate=500</Ping-Rate>
+                 <Ping-PubSub>-n Ping-PubSub -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true</Ping-PubSub>
+                 <Ping-Many-Topics>
+                     -n Ping-Many-Topics -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf pubsub=true destinationcount=4
+                 </Ping-Many-Topics>
+                  <Ping-Persistent>
+                     -n Ping-Persistent -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf persistent=true
+                 </Ping-Persistent>
+                  <Ping-Batch-Logging>
+                     -n Ping-Batch-Logging -s [100] -o . -t testAsyncPingOk 
org.apache.qpid.ping.PingAsyncTestPerf BatchSize=10
+                 </Ping-Batch-Logging>
+                 <Ping-Failover-Before-Send> 
+                     -n Ping-Failover-Before-Send -s [100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf CommitBatchSize=10 
FailBeforeSend=true
+                 </Ping-Failover-Before-Send>
+                 <Ping-Failover-After-Send>
+                     -n Ping-Failover-After-Send -s [100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf CommitBatchSize=10 
FailAfterSend=true
+                 </Ping-Failover-After-Send>
+                 <Ping-Failover-Before-Commit>
+                     -n Ping-Failover-Before-Commit -s [100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf CommitBatchSize=10 
FailBeforeCommit=true
+                 </Ping-Failover-Before-Commit>
+                 <Ping-Failover-After-Commit>
+                     -n Ping-Failover-After-Commit -s [100] -o . -t 
testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf CommitBatchSize=10 
FailAfterCommit=true
+                 </Ping-Failover-After-Commit>
 
                 </commands>
               </configuration>
@@ -276,13 +194,13 @@
               <executions>
                 <execution>
                   <phase>test</phase>
-                  <!##<goals>
+                  <!--<goals>
                     <goal>tktest</goal>
-                  </goals>##>
+                  </goals>-->
                 </execution>
               </executions>
             </plugin>
--->
+
             <!-- Bundles all the dependencies, fully expanded into a single 
jar, required to run the tests.
 
                  Usefull when bundling system, integration or performance 
tests into a convenient
@@ -312,7 +230,7 @@
         </plugins>
 
         <resources>
-           <!-- Include source files in built jar -->
+            <!-- Include source files in built jar -->
             <resource>
                 <targetPath>src/</targetPath>
                 <filtering>false</filtering>
@@ -321,7 +239,7 @@
                     <include>**/*.java</include>
                 </includes>
             </resource>
-           <!-- Include a log4j configuration in the jar at the root level 
(don't name this log4j.properties though as won't be able to override it). -->
+            <!-- Include a log4j configuration in the jar at the root level 
(don't name this log4j.properties though as won't be able to override it). -->
             <resource>
                 <targetPath>/</targetPath>
                 <filtering>false</filtering>

Modified: 
incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java
URL: 
http://svn.apache.org/viewvc/incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java?view=diff&rev=504056&r1=504055&r2=504056
==============================================================================
--- 
incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java
 (original)
+++ 
incubator/qpid/branches/perftesting_persistent/qpid/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongBouncer.java
 Tue Feb  6 01:57:35 2007
@@ -20,7 +20,9 @@
  */
 package org.apache.qpid.requestreply;
 
+import java.io.IOException;
 import java.net.InetAddress;
+import java.text.SimpleDateFormat;
 import java.util.Date;
 
 import javax.jms.*;
@@ -32,7 +34,6 @@
 import org.apache.qpid.client.AMQTopic;
 import org.apache.qpid.jms.ConnectionListener;
 import org.apache.qpid.jms.Session;
-import org.apache.qpid.ping.AbstractPingClient;
 import org.apache.qpid.topic.Config;
 
 /**
@@ -58,7 +59,7 @@
  *
  * @todo Make verbose accept a number of messages, only prints to console 
every X messages.
  */
-public class PingPongBouncer extends AbstractPingClient implements 
MessageListener
+public class PingPongBouncer implements MessageListener
 {
     private static final Logger _logger = 
Logger.getLogger(PingPongBouncer.class);
 
@@ -73,6 +74,9 @@
     /** The default exclusive flag for the message consumer. */
     private static final boolean EXCLUSIVE = false;
 
+    /** A convenient formatter to use when time stamping output. */
+    protected static final SimpleDateFormat timestampFormatter = new 
SimpleDateFormat("hh:mm:ss:SS");
+
     /** Used to indicate that the reply generator should log timing info to 
the console (logger info level). */
     private boolean _verbose = false;
 
@@ -93,6 +97,24 @@
     /** The producer session. */
     private Session _producerSession;
 
+    /** Holds the connection to the broker. */
+    private AMQConnection _connection;
+
+    /** Flag used to indicate if this is a point to point or pub/sub ping 
client. */
+    private boolean _isPubSub = false;
+
+    /**
+     * This flag is used to indicate that the user should be prompted to kill 
a broker, in order to test
+     * failover, immediately before committing a transaction.
+     */
+    protected boolean _failBeforeCommit = false;
+
+    /**
+     * This flag is used to indicate that the user should be prompted to a 
kill a broker, in order to test
+     * failover, immediate after committing a transaction.
+     */
+    protected boolean _failAfterCommit = false;
+
     /**
      * Creates a PingPongBouncer on the specified producer and consumer 
sessions.
      *
@@ -110,8 +132,8 @@
      * @throws Exception All underlying exceptions allowed to fall through. 
This is only test code...
      */
     public PingPongBouncer(String brokerDetails, String username, String 
password, String virtualpath,
-                           String destinationName, boolean persistent, boolean 
transacted, String selector,
-                           boolean verbose, boolean pubsub) throws Exception
+                           String destinationName, boolean persistent, boolean 
transacted, String selector, boolean verbose,
+                           boolean pubsub) throws Exception
     {
         // Create a client id to uniquely identify this client.
         InetAddress address = InetAddress.getLocalHost();
@@ -133,7 +155,8 @@
 
         // Create the queue to listen for message on.
         createConsumerDestination(destinationName);
-        MessageConsumer consumer = 
_consumerSession.createConsumer(_consumerDestination, PREFETCH, NO_LOCAL, 
EXCLUSIVE, selector);
+        MessageConsumer consumer =
+            _consumerSession.createConsumer(_consumerDestination, PREFETCH, 
NO_LOCAL, EXCLUSIVE, selector);
 
         // Create a producer for the replies, without a default destination.
         _replyProducer = _producerSession.createProducer(null);
@@ -144,18 +167,6 @@
         consumer.setMessageListener(this);
     }
 
-    private void createConsumerDestination(String name)
-    {
-        if (isPubSub())
-        {
-            _consumerDestination = new AMQTopic(name);
-        }
-        else
-        {
-            _consumerDestination = new AMQQueue(name);
-        }
-    }
-
     /**
      * Starts a stand alone ping-pong client running in verbose mode.
      *
@@ -177,12 +188,13 @@
         Config config = new Config();
         config.setOptions(args);
         String brokerDetails = config.getHost() + ":" + config.getPort();
-        String virtualpath = "/test";        
+        String virtualpath = "test";
         String destinationName = config.getDestination();
         if (destinationName == null)
         {
             destinationName = DEFAULT_DESTINATION_NAME;
         }
+
         String selector = config.getSelector();
         boolean transacted = config.isTransacted();
         boolean persistent = config.usePersistentMessages();
@@ -192,13 +204,22 @@
         //String selector = null;
 
         // Instantiate the ping pong client with the command line options and 
start it running.
-        PingPongBouncer pingBouncer = new PingPongBouncer(brokerDetails, 
"guest", "guest", virtualpath,
-                                                destinationName, persistent, 
transacted, selector, verbose, pubsub);
+        PingPongBouncer pingBouncer =
+            new PingPongBouncer(brokerDetails, "guest", "guest", virtualpath, 
destinationName, persistent, transacted,
+                                selector, verbose, pubsub);
         pingBouncer.getConnection().start();
 
         System.out.println("Waiting...");
     }
 
+    private static void usage()
+    {
+        System.err.println("Usage: PingPongBouncer \n" + "-host : broker 
host\n" + "-port : broker port\n"
+                           + "-destinationname : queue/topic name\n" + 
"-transacted : (true/false). Default is false\n"
+                           + "-persistent : (true/false). Default is false\n"
+                           + "-pubsub     : (true/false). Default is false\n" 
+ "-selector   : selector string\n");
+    }
+
     /**
      * This is a callback method that is notified of all messages for which 
this has been registered as a message
      * listener on a message consumer. It sends a reply (pong) to all messages 
it receieves on the reply to
@@ -260,14 +281,145 @@
         }
     }
 
-    private static void usage()
+    /**
+     * Gets the underlying connection that this ping client is running on.
+     *
+     * @return The underlying connection that this ping client is running on.
+     */
+    public AMQConnection getConnection()
+    {
+        return _connection;
+    }
+
+    /**
+     * Sets the connection that this ping client is using.
+     *
+     * @param connection The ping connection.
+     */
+    public void setConnection(AMQConnection connection)
+    {
+        this._connection = connection;
+    }
+
+    /**
+     * Sets or clears the pub/sub flag to indiciate whether this client is 
pinging a queue or a topic.
+     *
+     * @param pubsub <tt>true</tt> if this client is pinging a topic, 
<tt>false</tt> if it is pinging a queue.
+     */
+    public void setPubSub(boolean pubsub)
+    {
+        _isPubSub = pubsub;
+    }
+
+    /**
+     * Checks whether this client is a p2p or pub/sub ping client.
+     *
+     * @return <tt>true</tt> if this client is pinging a topic, <tt>false</tt> 
if it is pinging a queue.
+     */
+    public boolean isPubSub()
+    {
+        return _isPubSub;
+    }
+
+    /**
+     * Convenience method to commit the transaction on the specified session. 
If the session to commit on is not
+     * a transactional session, this method does nothing.
+     *
+     * <p/>If the [EMAIL PROTECTED] #_failBeforeCommit} flag is set, this will 
prompt the user to kill the broker before the
+     * commit is applied. If the [EMAIL PROTECTED] #_failAfterCommit} flag is 
set, this will prompt the user to kill the broker
+     * after the commit is applied.
+     *
+     * @throws javax.jms.JMSException If the commit fails and then the 
rollback fails.
+     */
+    protected void commitTx(Session session) throws JMSException
+    {
+        if (session.getTransacted())
+        {
+            try
+            {
+                if (_failBeforeCommit)
+                {
+                    _logger.trace("Failing Before Commit");
+                    doFailover();
+                }
+
+                session.commit();
+
+                if (_failAfterCommit)
+                {
+                    _logger.trace("Failing After Commit");
+                    doFailover();
+                }
+
+                _logger.trace("Session Commited.");
+            }
+            catch (JMSException e)
+            {
+                _logger.trace("JMSException on commit:" + e.getMessage(), e);
+
+                try
+                {
+                    session.rollback();
+                    _logger.debug("Message rolled back.");
+                }
+                catch (JMSException jmse)
+                {
+                    _logger.trace("JMSE on rollback:" + jmse.getMessage(), 
jmse);
+
+                    // Both commit and rollback failed. Throw the rollback 
exception.
+                    throw jmse;
+                }
+            }
+        }
+    }
+
+    /**
+     * Prompts the user to terminate the named broker, in order to test 
failover functionality. This method will block
+     * until the user supplied some input on the terminal.
+     *
+     * @param broker The name of the broker to terminate.
+     */
+    protected void doFailover(String broker)
     {
-        System.err.println("Usage: PingPongBouncer \n" + "-host : broker 
host\n" + "-port : broker port\n" +
-                           "-destinationname : queue/topic name\n" +
-                           "-transacted : (true/false). Default is false\n" +
-                           "-persistent : (true/false). Default is false\n" +
-                           "-pubsub     : (true/false). Default is false\n" +
-                           "-selector   : selector string\n");
+        System.out.println("Kill Broker " + broker + " now.");
+        try
+        {
+            System.in.read();
+        }
+        catch (IOException e)
+        { }
+
+        System.out.println("Continuing.");
+    }
+
+    /**
+     * Prompts the user to terminate the broker, in order to test failover 
functionality. This method will block
+     * until the user supplied some input on the terminal.
+     */
+    protected void doFailover()
+    {
+        System.out.println("Kill Broker now.");
+        try
+        {
+            System.in.read();
+        }
+        catch (IOException e)
+        { }
+
+        System.out.println("Continuing.");
+
+    }
+
+    private void createConsumerDestination(String name)
+    {
+        if (isPubSub())
+        {
+            _consumerDestination = new AMQTopic(name);
+        }
+        else
+        {
+            _consumerDestination = new AMQQueue(name);
+        }
     }
 
     /**


Reply via email to