You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by kp...@apache.org on 2011/10/19 15:48:39 UTC

svn commit: r1186215 - /qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp

Author: kpvdr
Date: Wed Oct 19 13:48:39 2011
New Revision: 1186215

URL: http://svn.apache.org/viewvc?rev=1186215&view=rev
Log:
QPID-3550: qpid-perftest fails if --npubs < --nsubs and --iterations > 0. Fixed the number of next messages sent to the sub_iteration queue.

Modified:
    qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp?rev=1186215&r1=1186214&r2=1186215&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-perftest.cpp Wed Oct 19 13:48:39 2011
@@ -173,7 +173,7 @@ struct Opts : public TestOptions {
             if (count % subs) {
                 count += subs - (count % subs);
                 cout << "WARNING: Adjusted --count to " << count
-                     << " the nearest multiple of --nsubs" << endl;
+                     << " the next multiple of --nsubs" << endl;
             }
             totalPubs = pubs*qt;
             totalSubs = subs*qt;
@@ -413,7 +413,7 @@ struct Controller : public Client {
                 AbsTime start=now();
                 send(opts.totalPubs, fqn("pub_start"), "start"); // Start publishers
                 if (j) {
-		    send(opts.totalPubs, fqn("sub_iteration"), "next"); // Start subscribers on next iteration
+                    send(opts.totalSubs, fqn("sub_iteration"), "next"); // Start subscribers on next iteration
                 }
 
                 Stats pubRates;
@@ -546,9 +546,9 @@ struct PublishThread : public Client {
                 if (opts.confirm) session.sync();
                 AbsTime end=now();
                 double time=secs(start,end);
-		if (time <= 0.0) {
-		  throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count.");
-		}
+                if (time <= 0.0) {
+                    throw Exception("ERROR: Test completed in zero seconds. Try again with a larger message count.");
+                }
 
                 // Send result to controller.
                 Message report(lexical_cast<string>(opts.count/time), fqn("pub_done"));



---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project:      http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org