summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2011-10-19 13:48:39 +0000
committerKim van der Riet <kpvdr@apache.org>2011-10-19 13:48:39 +0000
commit278553223e8c0e0d5a325095af6aa4f53a45da77 (patch)
treefb4ab57384b4c428f0bdb4e23082a80aed8b5879
parent7a3668346ba7471c4c4920baa29cec373fd073e7 (diff)
downloadqpid-python-278553223e8c0e0d5a325095af6aa4f53a45da77.tar.gz
QPID-3550: qpid-perftest fails if --npubs < --nsubs and --iterations > 0. Fixed the number of next messages sent to the sub_iteration queue.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1186215 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--qpid/cpp/src/tests/qpid-perftest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/cpp/src/tests/qpid-perftest.cpp b/qpid/cpp/src/tests/qpid-perftest.cpp
index dd81354adb..664f0cf877 100644
--- a/qpid/cpp/src/tests/qpid-perftest.cpp
+++ b/qpid/cpp/src/tests/qpid-perftest.cpp
@@ -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"));