summaryrefslogtreecommitdiff
path: root/qpid/java/perftests/pom.xml
blob: 3bcda0f3594edda52bc43b03af6e766272193049 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
<!--
    Licensed to the Apache Software Foundation (ASF) under one
    or more contributor license agreements. See the NOTICE file
    distributed with this work for additional information
    regarding copyright ownership. The ASF 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.
  -->
<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>
    <packaging>jar</packaging>
    <version>1.0-incubating-M2-SNAPSHOT</version>
    <name>Qpid Performance Tests</name>
    <url>http://cwiki.apache.org/confluence/display/qpid</url>

    <parent>
        <groupId>org.apache.qpid</groupId>
        <artifactId>qpid</artifactId>
        <version>1.0-incubating-M2-SNAPSHOT</version>
    </parent>

    <properties>
        <topDirectoryLocation>..</topDirectoryLocation>
        <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>
            <groupId>org.apache.qpid</groupId>
            <artifactId>qpid-client</artifactId>
        </dependency>

        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>

        <dependency>
            <groupId>uk.co.thebadgerset</groupId>
            <artifactId>junit-toolkit</artifactId>
        </dependency>

        <!-- Test dependencies. -->
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
            </plugin>

            <!-- 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
                 scripts.

                 To run from within maven:

                 mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tktest

                 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

                 To generate the scripts do:

                 mvn uk.co.thebadgerset:junit-toolkit-maven-plugin:tkscriptgen

                 Then to run the scripts, in the target directory do (after doing assembly:assembly goal):

                 ./script_name.sh

                 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>

              <configuration>
                <scriptOutDirectory>target</scriptOutDirectory>
                <testJar>${project.build.finalName}-all-test-deps.jar</testJar>

                <systemproperties>
                  <property>
                    <name>log4j.configuration</name>
                    <value>${log4j.perftests}</value>
                  </property>
                  <property>
                    <name>amqj.logging.level</name>
                    <value>warn</value>
                  </property>
                  <property><!-- Turn off most logging messages from the junit-toolkit test tool itself. -->
                    <name>badger.level</name>
                    <value>warn</value>
                  </property>
                  <property>
                    <name>amqj.test.logging.level</name>
                    <value>info</value>
                  </property>
                </systemproperties>

                <commands>
                  <!-- 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>

              <executions>
                <execution>
                  <phase>test</phase>
                  <!--<goals>
                    <goal>tktest</goal>
                  </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
                 package to hand over to testers. To use it run:

                 java -cp target/your_app_name-all-test-deps.jar path.to.your.Class

                 or often:

                 java -cp target/your_app_name-all-test-deps.jar junit.framework.textui.TestRunner path.to.your.test.Class

                 or other JUnit test runner invocations.
                 -->
            <plugin>
              <groupId>org.apache.maven.plugins</groupId>
              <artifactId>maven-assembly-plugin</artifactId>
              <version>2.2-SNAPSHOT</version>
              <configuration>
                <descriptors>
                  <descriptor>jar-with-dependencies.xml</descriptor>
                </descriptors>
                <outputDirectory>target</outputDirectory>
                <workDirectory>target/assembly/work</workDirectory>
              </configuration>
            </plugin>

        </plugins>

        <resources>
            <!-- Include source files in built jar -->
            <resource>
                <targetPath>src/</targetPath>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <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). -->
            <resource>
                <targetPath>/</targetPath>
                <filtering>false</filtering>
                <directory>src/main/java</directory>
                <includes>
                    <include>perftests.log4j</include>
                </includes>
            </resource>
        </resources>
    </build>

</project>