summaryrefslogtreecommitdiff
path: root/java
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2007-01-12 11:10:48 +0000
committerMartin Ritchie <ritchiem@apache.org>2007-01-12 11:10:48 +0000
commitb621a52c9d4efc9c80189960d0515a85687829fc (patch)
tree2e8bd86006c8921e223617606b3c23a0c8e55420 /java
parentc0d6c40e776dbb7e4c60a727fbced58d2ec50ee9 (diff)
downloadqpid-python-b621a52c9d4efc9c80189960d0515a85687829fc.tar.gz
QPID-278
broker distribution - modified to allow assembly:directory builds broker/pom.xml - moved slf4j to common/pom.xml QPID-283 Provided better feedback from shell scripts. Provided QuickTest shell script that runs the RequestReply tests. perftests distribution - modified to allow assembly:directory builds Moved Resource Readme content relating to Tests to RunningPerformanceTests.txt git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@495554 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
-rw-r--r--java/perftests/RunningPerformanceTests.txt96
-rwxr-xr-xjava/perftests/bin/serviceProvidingClient.sh12
-rwxr-xr-xjava/perftests/bin/serviceRequestReply-QuickTest.sh43
-rwxr-xr-xjava/perftests/bin/serviceRequestingClient.sh11
-rwxr-xr-xjava/perftests/bin/testPingClient.sh2
-rwxr-xr-xjava/perftests/bin/testPingProducer.sh2
-rwxr-xr-xjava/perftests/bin/testPingPublisher.sh2
-rwxr-xr-xjava/perftests/bin/testPingSubscriber.sh2
-rw-r--r--java/perftests/distribution/pom.xml3
-rw-r--r--java/perftests/distribution/src/main/assembly/performance.xml21
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceProvidingClient.java42
-rw-r--r--java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceRequestingClient.java44
-rw-r--r--java/perftests/src/main/java/perftests.log4j4
13 files changed, 236 insertions, 48 deletions
diff --git a/java/perftests/RunningPerformanceTests.txt b/java/perftests/RunningPerformanceTests.txt
new file mode 100644
index 0000000000..0b1d6d4f90
--- /dev/null
+++ b/java/perftests/RunningPerformanceTests.txt
@@ -0,0 +1,96 @@
+Running Performance Tests
+-------------------------
+
+This performance test suite contains a number of tests.
+
+- Service request-reply
+- Ping-Pong
+- Headers
+
+Service request-reply
+---------------------
+
+Description:
+This is the simplest test to ensure everything is working. This involves
+one client that is known as a "service provider" and it listens on a
+well-known queue for requests. Another client, known as the "service requester"
+creates a private (temporary) response queue, creates a message with the
+private response queue set as the "reply to" field and then publishes the
+message to the well known service queue. The test allows you to time how long
+it takes to send messages and receive the response back. It also allows varying
+of the message size.
+
+QuickRun:
+
+./serviceRequestReply-QuickTest.sh <brokerdetails> <number of messages>
+
+This provides a quick test to run everything against a running broker. Simply specify broker and number of messages to run.
+
+
+Detailed Run:
+
+You must start the service provider first:
+
+serviceProvidingClient.sh <brokerdetails> [<P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]>] [selector]
+
+where Brokerdetails is the connection information to the broker you are running on; e.g. localhost or localhost:5670 or tcp://10.10.10.10:5677.
+By default Non Persistent, Non Transaction messages are used in the response. A selector may also be specified.
+
+
+To run the service requester:
+
+serviceRequestingClient.sh <Brokerdetails> <Number of Messages> [<Message Size>] [<P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]>]
+
+This requests the <number of messages> of a <Message Size (default 4096 bytes>. By default the connection is Non Persistent and Non Transactional.
+
+After receiving all the messages the client outputs the rate it achieved.
+
+
+Ping-Pong
+---------
+
+
+
+
+Headers
+-------
+
+
+A more realistic test is the "headers test", which tests the
+performance of routing messages based on message headers to a
+configurable number of clients (e.g. 50). A publisher sends 10000
+messages to each client and waits to receive a message from each
+client when it has received all the messages.
+
+You run the listener processes first:
+
+run_many.sh 10 header "headersListener.sh -host 10.0.0.1 -port 5672"
+
+In this command, the first argument means start 10 processes, the
+second is just a name use in the log files generated and the third
+argument is the command to run. In this case it runs another shell
+script but it could be anything.
+
+Then run the publisher process:
+
+headersPublisher.sh -host 10.0.0.1 -port 5672 10000 10
+
+The last two arguments are: the number of messages to send to each
+client, and the number of clients.
+
+Note that before starting the publisher you should wait about 30
+seconds to ensure all the clients are registered with the broker (you
+can see this from the broker output). Otherwise the numbers will be
+slightly skewed.
+
+A third useful test, which can easily be ported to other JMS
+implementations is the "topic test". It does the same as the headers
+test but using a standard topic (e.g. pub sub).
+
+To run the listeners:
+
+run_many.sh 10 topic "topicListener.sh -host 10.0.0.1 -port 5672"
+
+and to run the publisher:
+
+topicPublisher.sh -host 10.0.0.1 -port 5672 -clients 10 -messages 10000 \ No newline at end of file
diff --git a/java/perftests/bin/serviceProvidingClient.sh b/java/perftests/bin/serviceProvidingClient.sh
index 4c51682b58..0f4264be10 100755
--- a/java/perftests/bin/serviceProvidingClient.sh
+++ b/java/perftests/bin/serviceProvidingClient.sh
@@ -17,15 +17,17 @@
# specific language governing permissions and limitations
# under the License.
#
-
-# XXX -Xms1024m -XX:NewSize=300m
+# args supplied: <brokerdetails> <num messages>
if [[ $# != 1 ]] ; then
- echo "usage: ./serviceProvidingClient.sh <brokerdetails>"
+ echo "usage: ./serviceProvidingClient.sh <brokerdetails> [<P[ersistent]|N[onPersistent] (default N)> <T[ransacted]|N[onTransacted] (default N)>] [selector]"
exit 1
fi
+thehosts=$1
+shift
+
. ./setupclasspath.sh
echo $CP
-# usage: just pass in the host(s)
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=perftests.log4j org.apache.qpid.requestreply.ServiceProvidingClient $1 guest guest /test serviceQ P T
+
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.requestreply.ServiceProvidingClient $thehosts guest guest /test serviceQ "$@"
diff --git a/java/perftests/bin/serviceRequestReply-QuickTest.sh b/java/perftests/bin/serviceRequestReply-QuickTest.sh
new file mode 100755
index 0000000000..667e6c2d87
--- /dev/null
+++ b/java/perftests/bin/serviceRequestReply-QuickTest.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+#
+# 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.
+#
+# args supplied: <brokerdetails> <num messages>
+
+if [[ $# != 2 ]] ; then
+ echo "usage: ./serviceQuickTest.sh <brokerdetails> <Number of messages> [<P[ersistent]|N[onPersistent] (default N)> <T[ransacted]|N[onTransacted] (default N)>]"
+ exit 1
+fi
+
+thehosts=$1
+shift
+
+numberofmessages=$1
+shift
+
+. ./setupclasspath.sh
+echo $CP
+
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.requestreply.ServiceProvidingClient $thehosts guest guest /test serviceQ "$@" &
+
+providingclient=$!
+
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.requestreply.ServiceRequestingClient $thehosts guest guest /test serviceQ $numberofmessages "$@"
+
+kill $providingclient
+
diff --git a/java/perftests/bin/serviceRequestingClient.sh b/java/perftests/bin/serviceRequestingClient.sh
index 4340cefcef..c03cc519c6 100755
--- a/java/perftests/bin/serviceRequestingClient.sh
+++ b/java/perftests/bin/serviceRequestingClient.sh
@@ -17,17 +17,18 @@
# specific language governing permissions and limitations
# under the License.
#
-# args supplied: <host:port> <num messages>
-#
+# usage: ./serviceRequestingClient.sh <brokerdetails> <number of messages> [<message size 4096b default>] [<P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]>]
+
if [[ $# < 2 ]] ; then
- echo "usage: ./serviceRequestingClient.sh <brokerdetails> <number of messages> [<message size 4096b default>]"
+ echo "usage: ./serviceRequestingClient.sh <brokerdetails> <number of messages> [<message size 4096b default>] [<P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]>]"
exit 1
fi
thehosts=$1
shift
-echo $thehosts
+
# XXX -Xms1024m -XX:NewSize=300m
. ./setupclasspath.sh
echo $CP
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Dlog.dir="$QPID_HOME/logs" -Damqj.test.logging.level="info" -Dlog4j.configuration=perftests.log4j org.apache.qpid.requestreply.ServiceRequestingClient $thehosts guest guest /test serviceQ P T "$@"
+
+$JAVA_HOME/bin/java -cp $CP -Dlog.dir="$QPID_HOME/logs" -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.requestreply.ServiceRequestingClient $thehosts guest guest /test serviceQ "$@"
diff --git a/java/perftests/bin/testPingClient.sh b/java/perftests/bin/testPingClient.sh
index 1e96b1c996..d819584999 100755
--- a/java/perftests/bin/testPingClient.sh
+++ b/java/perftests/bin/testPingClient.sh
@@ -30,4 +30,4 @@ echo $thehosts
# XXX -Xms1024m -XX:NewSize=300m
. ./setupclasspath.sh
echo $CP
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=perftests.log4j org.apache.qpid.pingpong.TestPingClient $thehosts guest guest /test "$@"
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.pingpong.TestPingClient $thehosts guest guest /test "$@"
diff --git a/java/perftests/bin/testPingProducer.sh b/java/perftests/bin/testPingProducer.sh
index 29e09a6f03..72c573780a 100755
--- a/java/perftests/bin/testPingProducer.sh
+++ b/java/perftests/bin/testPingProducer.sh
@@ -30,4 +30,4 @@ echo $thehosts
# XXX -Xms1024m -XX:NewSize=300m
. ./setupclasspath.sh
echo $CP
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=perftests.log4j org.apache.qpid.pingpong.TestPingProducer $thehosts /test
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.pingpong.TestPingProducer $thehosts /test
diff --git a/java/perftests/bin/testPingPublisher.sh b/java/perftests/bin/testPingPublisher.sh
index 61ed98d3e7..e8219e7612 100755
--- a/java/perftests/bin/testPingPublisher.sh
+++ b/java/perftests/bin/testPingPublisher.sh
@@ -30,4 +30,4 @@ echo $thehosts
# XXX -Xms1024m -XX:NewSize=300m
. ./setupclasspath.sh
echo $CP
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=perftests.log4j org.apache.qpid.pingpong.TestPingPublisher $thehosts /test
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="info" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.pingpong.TestPingPublisher $thehosts /test
diff --git a/java/perftests/bin/testPingSubscriber.sh b/java/perftests/bin/testPingSubscriber.sh
index 7bf17a619d..a0520be093 100755
--- a/java/perftests/bin/testPingSubscriber.sh
+++ b/java/perftests/bin/testPingSubscriber.sh
@@ -30,4 +30,4 @@ echo $thehosts
# XXX -Xms1024m -XX:NewSize=300m
. ./setupclasspath.sh
echo $CP
-$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="debug" -Dlog4j.configuration=perftests.log4j org.apache.qpid.pingpong.TestPingSubscriber $thehosts guest guest /test "$@"
+$JAVA_HOME/bin/java -cp $CP -Damqj.logging.level="warn" -Damqj.test.logging.level="debug" -Dlog4j.configuration=src/perftests.log4j org.apache.qpid.pingpong.TestPingSubscriber $thehosts guest guest /test "$@"
diff --git a/java/perftests/distribution/pom.xml b/java/perftests/distribution/pom.xml
index 3359520706..4f637715d1 100644
--- a/java/perftests/distribution/pom.xml
+++ b/java/perftests/distribution/pom.xml
@@ -64,6 +64,9 @@
<artifactId>maven-assembly-plugin</artifactId>
<version>${assembly.version}</version>
<configuration>
+ <descriptors>
+ <descriptor>src/main/assembly/performance.xml</descriptor>
+ </descriptors>
<finalName>qpid-${pom.version}</finalName>
<outputDirectory>${qpid.targetDir}</outputDirectory>
<tarLongFileMode>gnu</tarLongFileMode>
diff --git a/java/perftests/distribution/src/main/assembly/performance.xml b/java/perftests/distribution/src/main/assembly/performance.xml
index 36daeb6760..c8635e4130 100644
--- a/java/perftests/distribution/src/main/assembly/performance.xml
+++ b/java/perftests/distribution/src/main/assembly/performance.xml
@@ -26,6 +26,7 @@
</formats>
<fileSets>
+ <!-- Apache Licensing -->
<fileSet>
<directory>../../resources</directory>
<outputDirectory>qpid-${qpid.version}</outputDirectory>
@@ -36,20 +37,25 @@
<include>README.txt</include>
</includes>
</fileSet>
+
<fileSet>
- <directory>..</directory>
- <outputDirectory>qpid-${qpid.version}</outputDirectory>
+ <directory>../../release-docs</directory>
+ <outputDirectory>qpid-${qpid.version}/docs</outputDirectory>
<includes>
- <include>*.txt</include>
+ <include>RELEASE_NOTES.txt</include>
</includes>
</fileSet>
+
+ <!-- Performance txt files-->
<fileSet>
- <directory>../../release-docs</directory>
- <outputDirectory>qpid-${qpid.version}/docs</outputDirectory>
+ <directory>..</directory>
+ <outputDirectory>qpid-${qpid.version}</outputDirectory>
<includes>
- <include>RELEASE_NOTES.txt</include>
+ <include>*.txt</include>
</includes>
</fileSet>
+
+ <!-- Execution Scripts -->
<fileSet>
<directory>../bin</directory>
<outputDirectory>qpid-${qpid.version}/bin</outputDirectory>
@@ -57,6 +63,8 @@
<include>*</include>
</includes>
</fileSet>
+
+ <!-- Provide Source in easy access location -->
<fileSet>
<directory>../src/main</directory>
<outputDirectory>qpid-${qpid.version}/src</outputDirectory>
@@ -66,6 +74,7 @@
</includes>
</fileSet>
+ <!-- Metadata Jar -->
<fileSet>
<directory>target</directory>
<outputDirectory>qpid-${qpid.version}/lib</outputDirectory>
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceProvidingClient.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceProvidingClient.java
index 66950ddf3e..00528c3a5d 100644
--- a/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceProvidingClient.java
+++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceProvidingClient.java
@@ -49,13 +49,13 @@ public class ServiceProvidingClient
public ServiceProvidingClient(String brokerDetails, String username, String password,
String clientName, String virtualPath, String serviceName,
- String deliveryModeString, String transactedMode)
+ final int deliveryMode, boolean transactedMode, String selector)
throws AMQException, JMSException, URLSyntaxException
{
- final int deliveryMode = deliveryModeString.toUpperCase().charAt(0) == 'P' ? DeliveryMode.PERSISTENT : DeliveryMode.NON_PERSISTENT;
- _isTransactional = transactedMode.toUpperCase().charAt(0) == 'T' ? true : false;
+ _isTransactional = transactedMode;
- _logger.info("Delivery Mode: " + deliveryMode + "\t isTransactional: " + _isTransactional);
+ _logger.info("Delivery Mode: " + (deliveryMode == DeliveryMode.NON_PERSISTENT ? "Non Persistent" : "Persistent")
+ + "\t isTransactional: " + _isTransactional);
_connection = new AMQConnection(brokerDetails, username, password,
clientName, virtualPath);
@@ -93,7 +93,7 @@ public class ServiceProvidingClient
AMQQueue destination = new AMQQueue(serviceName);
MessageConsumer consumer = _session.createConsumer(destination,
- 100, true, false, null);
+ 100, true, false, selector);
consumer.setMessageListener(new MessageListener()
{
@@ -153,11 +153,11 @@ public class ServiceProvidingClient
_destinationProducer.send(msg);
- if(_isTransactional)
+ if (_isTransactional)
{
_producerSession.commit();
}
- if(_isTransactional)
+ if (_isTransactional)
{
_session.commit();
}
@@ -184,10 +184,9 @@ public class ServiceProvidingClient
{
_logger.info("Starting...");
- if (args.length < 7)
+ if (args.length < 5)
{
- System.out.println("Usage: <brokerDetails> <username> <password> <virtual-path> <serviceQueue>" +
- " <P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]> [selector]");
+ System.out.println("Usage: serviceProvidingClient <brokerDetails> <username> <password> <virtual-path> <serviceQueue> [<P[ersistent]|N[onPersistent]> <T[ransacted]|N[onTransacted]>] [selector]");
System.exit(1);
}
String clientId = null;
@@ -201,10 +200,29 @@ public class ServiceProvidingClient
_logger.error("Error: " + e, e);
}
+
+ int deliveryMode = DeliveryMode.NON_PERSISTENT;
+ boolean transactedMode = false;
+
+ if (args.length > 7)
+ {
+ deliveryMode = args[args.length - 2].toUpperCase().charAt(0) == 'P' ? DeliveryMode.PERSISTENT
+ : DeliveryMode.NON_PERSISTENT;
+
+ transactedMode = args[args.length - 1].toUpperCase().charAt(0) == 'T' ? true : false;
+ }
+
+ String selector = null;
+ if ((args.length == 8) || (args.length == 7))
+ {
+ selector = args[args.length - 1];
+ }
+
try
{
ServiceProvidingClient client = new ServiceProvidingClient(args[0], args[1], args[2],
- clientId, args[3], args[4], args[5], args[6]);
+ clientId, args[3], args[4],
+ deliveryMode, transactedMode, selector);
client.run();
}
catch (JMSException e)
@@ -219,6 +237,8 @@ public class ServiceProvidingClient
{
_logger.error("Error: " + e, e);
}
+
+
}
}
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceRequestingClient.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceRequestingClient.java
index de49124035..2c1c0ecff6 100644
--- a/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceRequestingClient.java
+++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/ServiceRequestingClient.java
@@ -91,7 +91,7 @@ public class ServiceRequestingClient implements ExceptionListener
}
try
{
- m.getPropertyNames();
+ m.getPropertyNames();
if (m.propertyExists("timeSent"))
{
long timeSent = Long.parseLong(m.getStringProperty("timeSent"));
@@ -162,15 +162,13 @@ public class ServiceRequestingClient implements ExceptionListener
public ServiceRequestingClient(String brokerHosts, String clientID, String username, String password,
String vpath, String commandQueueName,
- String deliveryModeString, String transactedMode,
+ int deliveryMode, boolean transactedMode,
final int messageCount, final int messageDataLength) throws AMQException, URLSyntaxException
{
- final int deliveryMode = deliveryModeString.toUpperCase().charAt(0) == 'P' ? DeliveryMode.PERSISTENT
- : DeliveryMode.NON_PERSISTENT;
+ _isTransactional = transactedMode;
- _isTransactional = transactedMode.toUpperCase().charAt(0) == 'T' ? true : false;
-
- _log.info("Delivery Mode: " + deliveryMode + "\t isTransactional: " + _isTransactional);
+ _log.info("Delivery Mode: " + (deliveryMode == DeliveryMode.NON_PERSISTENT ? "Non Persistent" : "Persistent") +
+ "\t isTransactional: " + _isTransactional);
_messageCount = messageCount;
MESSAGE_DATA = TestMessageFactory.createMessagePayload(messageDataLength);
@@ -198,7 +196,7 @@ public class ServiceRequestingClient implements ExceptionListener
TextMessage first = _session.createTextMessage(MESSAGE_DATA);
first.setJMSReplyTo(_tempDestination);
send(first);
- if(_isTransactional)
+ if (_isTransactional)
{
_producerSession.commit();
}
@@ -248,7 +246,7 @@ public class ServiceRequestingClient implements ExceptionListener
msg.setLongProperty("timeSent", timeNow);
}
send(msg);
- if(_isTransactional)
+ if (_isTransactional)
{
_producerSession.commit();
}
@@ -275,22 +273,36 @@ public class ServiceRequestingClient implements ExceptionListener
*/
public static void main(String[] args)
{
- if (args.length < 9)
+ if (args.length < 6)
{
- System.err.println("Usage: ServiceRequestingClient <brokerDetails - semicolon separated host:port list>" +
- " <username> <password> <vpath> <command queue name> <P[ersistent]|N[onPersistent]>" +
- " <T[ransacted]|N[onTransacted]> <number of messages> <message size>");
+ System.err.println(
+ "Usage: ServiceRequestingClient <brokerDetails> <username> <password> <vpath> <command queue name> <number of messages> [<message size>] [<P[ersistent]|N[onPersistent] (Default N)> <T[ransacted]|N[onTransacted] (Default N)>]");
System.exit(1);
}
try
{
- int messageDataLength = args.length > 8 ? Integer.parseInt(args[8]) : 4096;
+ int messageSize = 4096;
+ boolean transactedMode = false;
+ int deliveryMode = DeliveryMode.NON_PERSISTENT;
+
+ if (args.length > 7)
+ {
+ deliveryMode = args[args.length - 2].toUpperCase().charAt(0) == 'P' ? DeliveryMode.PERSISTENT
+ : DeliveryMode.NON_PERSISTENT;
+
+ transactedMode = args[args.length - 1].toUpperCase().charAt(0) == 'T' ? true : false;
+ }
+
+ if ((args.length == 9) ||(args.length == 7))
+ {
+ messageSize = Integer.parseInt(args[6]);
+ }
InetAddress address = InetAddress.getLocalHost();
String clientID = address.getHostName() + System.currentTimeMillis();
ServiceRequestingClient client = new ServiceRequestingClient(args[0], clientID, args[1], args[2], args[3],
- args[4], args[5], args[6], Integer.parseInt(args[7]),
- messageDataLength);
+ args[4], deliveryMode, transactedMode, Integer.parseInt(args[5]),
+ messageSize);
Object waiter = new Object();
client.run(waiter);
synchronized (waiter)
diff --git a/java/perftests/src/main/java/perftests.log4j b/java/perftests/src/main/java/perftests.log4j
index e15cb9b285..5410f9ecd2 100644
--- a/java/perftests/src/main/java/perftests.log4j
+++ b/java/perftests/src/main/java/perftests.log4j
@@ -28,7 +28,9 @@ log4j.logger.org.apache.qpid.pingpong=${amqj.test.logging.level}
log4j.appender.console=org.apache.log4j.ConsoleAppender
log4j.appender.console.Threshold=all
log4j.appender.console.layout=org.apache.log4j.PatternLayout
-log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
+
+#log4j.appender.console.layout.ConversionPattern=%t %d %p [%c{4}] %m%n
+log4j.appender.console.layout.ConversionPattern=[%c] %m%n
log4j.appender.fileApp=org.apache.log4j.FileAppender
log4j.appender.fileApp.file=${log.dir}/perftests.volumetest.log