You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ru...@apache.org on 2007/08/16 12:16:49 UTC

svn commit: r566643 - in /incubator/qpid/branches/M2/java/perftests: pom.xml src/main/java/org/apache/qpid/ping/PingClient.java src/main/java/org/apache/qpid/requestreply/PingPongProducer.java

Author: rupertlssmith
Date: Thu Aug 16 03:16:48 2007
New Revision: 566643

URL: http://svn.apache.org/viewvc?view=rev&rev=566643
Log:
Fixed multiplcation for expected message count on shared destinations p2p.

Modified:
    incubator/qpid/branches/M2/java/perftests/pom.xml
    incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java
    incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java

Modified: incubator/qpid/branches/M2/java/perftests/pom.xml
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/perftests/pom.xml?view=diff&rev=566643&r1=566642&r2=566643
==============================================================================
--- incubator/qpid/branches/M2/java/perftests/pom.xml (original)
+++ incubator/qpid/branches/M2/java/perftests/pom.xml Thu Aug 16 03:16:48 2007
@@ -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>

Modified: incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java?view=diff&rev=566643&r1=566642&r2=566643
==============================================================================
--- incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java (original)
+++ incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/ping/PingClient.java Thu Aug 16 03:16:48 2007
@@ -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 @@
  * 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 @@
  */
 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 @@
      *
      * @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;
         }
     }

Modified: incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java
URL: http://svn.apache.org/viewvc/incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java?view=diff&rev=566643&r1=566642&r2=566643
==============================================================================
--- incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java (original)
+++ incubator/qpid/branches/M2/java/perftests/src/main/java/org/apache/qpid/requestreply/PingPongProducer.java Thu Aug 16 03:16:48 2007
@@ -435,10 +435,10 @@
     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 @@
     }
 
     /**
-     * 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);
     }
 
     /**