summaryrefslogtreecommitdiff
path: root/qpid/cpp/src/tests/qpid-perftest.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2011-11-16 16:10:42 +0000
committerKim van der Riet <kpvdr@apache.org>2011-11-16 16:10:42 +0000
commit937f24744e430008edb9d5063eeac5030f01c2f7 (patch)
tree18815b855c039596a921d93d9698e5b111c862e9 /qpid/cpp/src/tests/qpid-perftest.cpp
parent3ef3040ec768200971cfec3913e6646c0d0c6c3e (diff)
downloadqpid-python-937f24744e430008edb9d5063eeac5030f01c2f7.tar.gz
NO_JIRA: Rolled back accidental checkin of experimental code in r.1202755 (checkin from wrong dir)
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1202760 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-perftest.cpp')
-rw-r--r--qpid/cpp/src/tests/qpid-perftest.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/qpid/cpp/src/tests/qpid-perftest.cpp b/qpid/cpp/src/tests/qpid-perftest.cpp
index 919ab5db4b..664f0cf877 100644
--- a/qpid/cpp/src/tests/qpid-perftest.cpp
+++ b/qpid/cpp/src/tests/qpid-perftest.cpp
@@ -424,9 +424,9 @@ struct Controller : public Client {
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.");
+ }
double txrate=opts.transfers/time;
double mbytes=(txrate*opts.size)/(1024*1024);
@@ -472,11 +472,10 @@ struct Controller : public Client {
struct PublishThread : public Client {
string destination;
string routingKey;
- size_t pubNum;
- PublishThread() : pubNum(0) {};
+ PublishThread() {};
- PublishThread(size_t pubNum, string key, string dest=string()) : pubNum(pubNum) {
+ PublishThread(string key, string dest=string()) {
destination=dest;
routingKey=key;
}
@@ -534,7 +533,6 @@ struct PublishThread : public Client {
arg::content=msg,
arg::acceptMode=1);
}
-if ((i+1)%100==0) std::cout << pubNum << std::flush;
if (opts.txPub && ((i+1) % opts.txPub == 0)){
if (opts.commitAsync){
session.txCommit();
@@ -632,7 +630,6 @@ struct SubscribeThread : public Client {
size_t expect=0;
for (size_t i = 0; i < opts.subQuota; ++i) {
msg=lq.pop();
-if ((i+1)%100==0) std::cout << "s" << std::flush;
if (opts.txSub && ((i+1) % opts.txSub == 0)) {
if (opts.commitAsync) session.txCommit();
else sync(session).txCommit();
@@ -711,7 +708,7 @@ int main(int argc, char** argv) {
if (opts.publish) {
size_t n = singleProcess ? opts.pubs : 1;
for (size_t j = 0; j < n; ++j) {
- pubs.push_back(new PublishThread(j, key.str(), exchange));
+ pubs.push_back(new PublishThread(key.str(), exchange));
pubs.back().thread=Thread(pubs.back());
}
}