You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by ac...@apache.org on 2012/04/16 21:20:40 UTC

svn commit: r1326757 - in /qpid/trunk/qpid/cpp/src/tests: qpid-cluster-benchmark qpid-cpp-benchmark qpid-send.cpp

Author: aconway
Date: Mon Apr 16 19:20:40 2012
New Revision: 1326757

URL: http://svn.apache.org/viewvc?rev=1326757&view=rev
Log:
NO-JIRA: Removed useless flow control code from qpid-send.

This code serves no purpose now that qpidd has producer flow control.
Removed it to simplify the tests.

Modified:
    qpid/trunk/qpid/cpp/src/tests/qpid-cluster-benchmark
    qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
    qpid/trunk/qpid/cpp/src/tests/qpid-send.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-cluster-benchmark
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-cluster-benchmark?rev=1326757&r1=1326756&r2=1326757&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cluster-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cluster-benchmark Mon Apr 16 19:20:40 2012
@@ -22,7 +22,6 @@
 
 # Default options
 MESSAGES="-m 10000"
-FLOW="--flow-control 100"	      # Flow control limit on queue depth for latency.
 REPEAT="--repeat 10"
 QUEUES="-q 6"
 SENDERS="-s 3"
@@ -38,7 +37,6 @@ while getopts "m:f:n:b:q:s:r:c:h:i:txyv-
     case $opt in
 	b) BROKERS="-b $OPTARG";;
 	c) CLIENT_HOSTS="-c $OPTARG";;
-	f) FLOW="--flow-control $OPTARG";;
 	h) HEARTBEAT=$OPTARG;;
 	i) RECONNECT=$OPTARG;;
 	m) MESSAGES="-m $OPTARG";;

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1326757&r1=1326756&r2=1326757&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Mon Apr 16 19:20:40 2012
@@ -67,8 +67,6 @@ op.add_option("--sequence", dest="sequen
               action="store_true", help="add a sequence number to each message")
 op.add_option("--connection-options", type="str",
               help="Connection options for senders & receivers")
-op.add_option("--flow-control", default=0, type="int", metavar="N",
-              help="Flow control each sender to limit queue depth to 2*N. 0 means no flow control.")
 op.add_option("--durable", default=False, action="store_true",
               help="Use durable queues and messages")
 op.add_option("--save-received", default=False, action="store_true",
@@ -150,7 +148,6 @@ def start_send(queue, opts, broker, host
                "--report-header=no",
                "--timestamp=%s"%(opts.timestamp and "yes" or "no"),
                "--sequence=%s"%(opts.sequence and "yes" or "no"),
-               "--flow-control", str(opts.flow_control),
                "--durable", str(opts.durable)
                ]
     command += opts.send_arg

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-send.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-send.cpp?rev=1326757&r1=1326756&r2=1326757&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-send.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-send.cpp Mon Apr 16 19:20:40 2012
@@ -85,7 +85,6 @@ struct Options : public qpid::Options
     uint reportEvery;
     bool reportHeader;
     uint sendRate;
-    uint flowControl;
     bool sequence;
     bool timestamp;
     std::string groupKey;
@@ -115,7 +114,6 @@ struct Options : public qpid::Options
           reportEvery(0),
           reportHeader(true),
           sendRate(0),
-          flowControl(0),
           sequence(true),
           timestamp(true),
           groupPrefix("GROUP-"),
@@ -149,7 +147,6 @@ struct Options : public qpid::Options
             ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput statistics every N messages")
             ("report-header", qpid::optValue(reportHeader, "yes|no"), "Headers on report.")
             ("send-rate", qpid::optValue(sendRate,"N"), "Send at rate of N messages/second. 0 means send as fast as possible.")
-            ("flow-control", qpid::optValue(flowControl,"N"), "Do end to end flow control to limit queue depth to 2*N. 0 means no flow control.")
             ("sequence", qpid::optValue(sequence, "yes|no"), "Add a sequence number messages property (required for duplicate/lost message detection)")
             ("timestamp", qpid::optValue(timestamp, "yes|no"), "Add a time stamp messages property (required for latency measurement)")
             ("group-key", qpid::optValue(groupKey, "KEY"), "Generate groups of messages using message header 'KEY' to hold the group identifier")
@@ -371,8 +368,6 @@ int main(int argc, char ** argv)
                 msg.setPriority(opts.priority);
             }
             if (!opts.replyto.empty()) {
-                if (opts.flowControl)
-                    throw Exception("Can't use reply-to and flow-control together");
                 msg.setReplyTo(Address(opts.replyto));
             }
             if (!opts.userid.empty()) msg.setUserId(opts.userid);
@@ -406,26 +401,10 @@ int main(int argc, char ** argv)
             int64_t interval = 0;
             if (opts.sendRate) interval = qpid::sys::TIME_SEC/opts.sendRate;
 
-            Receiver flowControlReceiver;
-            Address flowControlAddress("flow-"+Uuid(true).str()+";{create:always,delete:always}");
-            uint flowSent = 0;
-            if (opts.flowControl) {
-                flowControlReceiver = session.createReceiver(flowControlAddress);
-                flowControlReceiver.setCapacity(2);
-            }
-
             while (contentGen->setContent(msg)) {
                 ++sent;
                 if (opts.sequence)
                     msg.getProperties()[SN] = sent;
-                if (opts.flowControl) {
-                    if ((sent % opts.flowControl) == 0) {
-                        msg.setReplyTo(flowControlAddress);
-                        ++flowSent;
-                    }
-                    else
-                        msg.setReplyTo(Address()); // Clear the reply address.
-                }
                 if (groupGen.get())
                     groupGen->setGroupInfo(msg);
 
@@ -444,19 +423,12 @@ int main(int argc, char ** argv)
                 }
                 if (opts.messages && sent >= opts.messages) break;
 
-                if (opts.flowControl && flowSent == 2) {
-                    flowControlReceiver.get(Duration::SECOND);
-                    --flowSent;
-                }
-
                 if (opts.sendRate) {
                     qpid::sys::AbsTime waitTill(start, sent*interval);
                     int64_t delay = qpid::sys::Duration(qpid::sys::now(), waitTill);
                     if (delay > 0) qpid::sys::usleep(delay/qpid::sys::TIME_USEC);
                 }
             }
-            for ( ; flowSent>0; --flowSent)
-                flowControlReceiver.get(Duration::SECOND);
             if (opts.reportTotal) reporter.report();
             for (uint i = opts.sendEos; i > 0; --i) {
                 if (opts.sequence)



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org