diff options
| author | Rupert Smith <rupertlssmith@apache.org> | 2007-08-16 10:16:48 +0000 |
|---|---|---|
| committer | Rupert Smith <rupertlssmith@apache.org> | 2007-08-16 10:16:48 +0000 |
| commit | 21ec90fa6f5d192df0e2753de0bace17bef5e7d2 (patch) | |
| tree | 5cced6ffe20480949177c95ced0265dbd22da8e8 /java | |
| parent | abc5e0fb1ca84adf1b06c4cd4fb45e55faa55f76 (diff) | |
| download | qpid-python-21ec90fa6f5d192df0e2753de0bace17bef5e7d2.tar.gz | |
Fixed multiplcation for expected message count on shared destinations p2p.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2@566643 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java')
3 files changed, 64 insertions, 12 deletions
diff --git a/java/perftests/pom.xml b/java/perftests/pom.xml index 132eb83e8c..39cd5a0a3a 100644 --- a/java/perftests/pom.xml +++ b/java/perftests/pom.xml @@ -317,6 +317,38 @@ <PTM-Qpid-01-1M>-n PTM-Qpid-01-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-01-1M> <PTM-Qpid-02-1M>-n PTM-Qpid-02-1M -d10M -s[1000] -c[8] -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=true transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048476 destinationCount=1 rate=0 maxPending=80000000</PTM-Qpid-02-1M> + <!-- Benchmarking Tests for P2P. --> + <!-- + Bench mark 1. P2P messaging from 1:1 to 1:32, shared queue, load balancing scenario. + Non-tx, and 1 msg per tx. + Persistent and non-persistent. + No rate limiting. + Small messages, 256 bytes. + --> + <TQB-Qpid-01>-n TQB-Qpid-01 -d1M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false</TQB-Qpid-01> + <TQB-Qpid-02>-n TQB-Qpid-02 -d1M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false</TQB-Qpid-02> + <PQB-Qpid-01>-n PQB-Qpid-01 -d1M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=true commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false</PQB-Qpid-01> + <PQB-Qpid-02>-n PQB-Qpid-02 -d1M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=true pubsub=false transacted=false commitBatchSize=1 batchSize=1000 messageSize=256 destinationCount=1 rate=0 maxPending=80000000 uniqueDests=false</PQB-Qpid-02> + + <!-- + <TQM-Qpid-01-512b>-n TQM-Qpid-01-512b -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-512b> + <TQM-Qpid-02-512b>-n TQM-Qpid-02-512b -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-512b> + <TQM-Qpid-01-1K>-n TQM-Qpid-01-1K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-1K> + <TQM-Qpid-02-1K>-n TQM-Qpid-02-1K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1024 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-1K> + <TQM-Qpid-01-5K>-n TQM-Qpid-01-5K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-5K> + <TQM-Qpid-02-5K>-n TQM-Qpid-02-5K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=5120 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-5K> + <TQM-Qpid-01-10K>-n TQM-Qpid-01-10K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-10K> + <TQM-Qpid-02-10K>-n TQM-Qpid-02-10K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=10240 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-10K> + <TQM-Qpid-01-50K>-n TQM-Qpid-01-50K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-50K> + <TQM-Qpid-02-50K>-n TQM-Qpid-02-50K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=51200 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-50K> + <TQM-Qpid-01-100K>-n TQM-Qpid-01-100K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-100K> + <TQM-Qpid-02-100K>-n TQM-Qpid-02-100K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=102400 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-100K> + <TQM-Qpid-01-500K>-n TQM-Qpid-01-500K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-500K> + <TQM-Qpid-02-500K>-n TQM-Qpid-02-500K -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=512000 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-500K> + <TQM-Qpid-01-1M>-n TQM-Qpid-01-1M -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=true commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-01-1M> + <TQM-Qpid-02-1M>-n TQM-Qpid-02-1M -d10M -s[1000] -c[1,32],samples=6,exp -o $QPID_WORK/results -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf persistent=false pubsub=false transacted=false commitBatchSize=10 batchSize=1000 messageSize=1048576 destinationCount=1 rate=0 maxPending=80000000</TQM-Qpid-02-1M> + --> + <!-- Failover Tests. --> <FT-Qpid-01>-n FT-Qpid-01 -s[2500] -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf messageSize=256 batchSize=10000 transacted=true broker="tcp://127.0.0.1:5001;tcp://127.0.0.1:5002" failBeforeSend=true -o $QPID_WORK/results</FT-Qpid-01> <FT-Qpid-02>-n FT-Qpid-02 -s[2500] -t testAsyncPingOk org.apache.qpid.ping.PingAsyncTestPerf messageSize=256 batchSize=10000 transacted=true broker="tcp://127.0.0.1:5001;tcp://127.0.0.1:5002" failAfterSend=true -o $QPID_WORK/results</FT-Qpid-02> diff --git a/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java b/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java index e3b0249ed3..984b994c05 100644 --- a/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java +++ b/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java @@ -20,12 +20,14 @@ */
package org.apache.qpid.ping;
-import java.util.List;
-import java.util.Properties;
+import org.apache.log4j.Logger;
+
+import org.apache.qpid.requestreply.PingPongProducer;
import javax.jms.Destination;
-import org.apache.qpid.requestreply.PingPongProducer;
+import java.util.List;
+import java.util.Properties;
/**
* PingClient is a {@link PingPongProducer} that does not need a {@link org.apache.qpid.requestreply.PingPongBouncer}
@@ -36,7 +38,7 @@ import org.apache.qpid.requestreply.PingPongProducer; * are created they will all be run in parallel and be active in sending and consuming pings at the same time.
* If the unique destinations flag is not set and a pub/sub ping cycle is being run, this means that they will all hear
* pings sent by each other. The expected number of pings received will therefore be multiplied up by the number of
- * active ping clients. The {@link #getConsumersPerTopic()} method is used to supply this multiplier under these
+ * active ping clients. The {@link #getConsumersPerDestination()} method is used to supply this multiplier under these
* conditions.
*
* <p/><table id="crc"><caption>CRC Card</caption>
@@ -47,6 +49,9 @@ import org.apache.qpid.requestreply.PingPongProducer; */
public class PingClient extends PingPongProducer
{
+ /** Used for debugging. */
+ private final Logger log = Logger.getLogger(PingClient.class);
+
/** Used to count the number of ping clients created. */
private static int _pingClientCount;
@@ -82,14 +87,20 @@ public class PingClient extends PingPongProducer *
* @return The scaling up of the number of expected pub/sub pings.
*/
- public int getConsumersPerTopic()
+ public int getConsumersPerDestination()
{
+ log.debug("public int getConsumersPerDestination(): called");
+
if (_isUnique)
{
+ log.debug("1 consumer per destination.");
+
return 1;
}
else
{
+ log.debug(_pingClientCount + " consumers per destination.");
+
return _pingClientCount;
}
}
diff --git a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java index 140e3bad1c..1a731b2b7e 100644 --- a/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java +++ b/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java @@ -435,10 +435,10 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis protected MessageConsumer _consumer;
/**
- * Holds the number of consumers that will be attached to each topic. Each pings will result in a reply from each of the
- * attached clients
+ * Holds the number of consumers that will be attached to each destination in the test. Each pings will result in
+ * a message being received by each of these clients in a pub/sub tests, and by only one at a time in a p2p test.
*/
- static int _consumersPerTopic = 1;
+ static int _consumersPerDestination = 1;
/** The prompt to display when asking the user to kill the broker for failover testing. */
private static final String KILL_BROKER_PROMPT = "Kill broker now, then press Return.";
@@ -1427,18 +1427,27 @@ public class PingPongProducer implements Runnable, MessageListener, ExceptionLis }
/**
- * This value will be changed by PingClient to represent the number of clients connected to each topic.
+ * Gets the number of consumers that are listening to each destination in the test.
*
* @return int The number of consumers subscribing to each topic.
*/
- public int getConsumersPerTopic()
+ public int getConsumersPerDestination()
{
- return _consumersPerTopic;
+ return _consumersPerDestination;
}
+ /**
+ * Calculates how many pings are expected to be received for the given number sent.
+ *
+ * @param numpings The number of pings that will be sent.
+ *
+ * @return The number that should be received, for the test to pass.
+ */
public int getExpectedNumPings(int numpings)
{
- return numpings * getConsumersPerTopic();
+ log.debug("Each ping will be received by " + (_isPubSub ? getConsumersPerDestination() : 1) + " consumers.");
+
+ return numpings * (_isPubSub ? getConsumersPerDestination() : 1);
}
/**
|
