diff options
author | Alan Conway <aconway@apache.org> | 2010-04-07 20:51:05 +0000 |
---|---|---|
committer | Alan Conway <aconway@apache.org> | 2010-04-07 20:51:05 +0000 |
commit | e65e3f05b91fb871340050c8fe57686809c72101 (patch) | |
tree | 229532b87b175f4783834e0ae303a905715c0589 /cpp/src | |
parent | 78df5d55bc32a2dbd94b259f1c843b259e745c47 (diff) | |
download | qpid-python-e65e3f05b91fb871340050c8fe57686809c72101.tar.gz |
Fix ambiguous --report option in qpid_send, qpid_recv.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@931681 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/tests/qpid_recv.cpp | 10 | ||||
-rw-r--r-- | cpp/src/tests/qpid_send.cpp | 8 |
2 files changed, 9 insertions, 9 deletions
diff --git a/cpp/src/tests/qpid_recv.cpp b/cpp/src/tests/qpid_recv.cpp index ff19464621..602f91d74e 100644 --- a/cpp/src/tests/qpid_recv.cpp +++ b/cpp/src/tests/qpid_recv.cpp @@ -61,7 +61,7 @@ struct Options : public qpid::Options bool printHeaders; bool failoverUpdates; qpid::log::Options log; - bool report; + bool reportTotal; uint reportEvery; Options(const std::string& argv0=std::string()) @@ -72,7 +72,7 @@ struct Options : public qpid::Options forever(false), messages(0), ignoreDuplicates(false), - capacity(10000), + capacity(1000), ackFrequency(100), tx(0), rollbackFrequency(0), @@ -80,7 +80,7 @@ struct Options : public qpid::Options printHeaders(false), failoverUpdates(false), log(argv0), - report(false), + reportTotal(false), reportEvery(0) { addOptions() @@ -98,7 +98,7 @@ struct Options : public qpid::Options ("print-content", qpid::optValue(printContent, "yes|no"), "print out message content") ("print-headers", qpid::optValue(printHeaders, "yes|no"), "print out message headers") ("failover-updates", qpid::optValue(failoverUpdates), "Listen for membership updates distributed via amq.failover") - ("report", qpid::optValue(report), "Report throughput statistics") + ("report-total", qpid::optValue(reportTotal), "Report total throughput and latency statistics") ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput and latency statistics every N messages.") ("help", qpid::optValue(help), "print this usage statement"); add(log); @@ -207,7 +207,7 @@ int main(int argc, char ** argv) } //opts.rejectFrequency?? } - if (opts.report) reporter.report(); + if (opts.reportTotal) reporter.report(); if (opts.tx) { if (opts.rollbackFrequency && (++txCount % opts.rollbackFrequency == 0)) { session.rollback(); diff --git a/cpp/src/tests/qpid_send.cpp b/cpp/src/tests/qpid_send.cpp index a4a224caa8..26e9003b2d 100644 --- a/cpp/src/tests/qpid_send.cpp +++ b/cpp/src/tests/qpid_send.cpp @@ -66,7 +66,7 @@ struct Options : public qpid::Options uint capacity; bool failoverUpdates; qpid::log::Options log; - bool report; + bool reportTotal; uint reportEvery; uint rate; @@ -83,7 +83,7 @@ struct Options : public qpid::Options capacity(1000), failoverUpdates(false), log(argv0), - report(false), + reportTotal(false), reportEvery(0), rate(0) { @@ -106,7 +106,7 @@ struct Options : public qpid::Options ("tx", qpid::optValue(tx, "N"), "batch size for transactions (0 implies transaction are not used)") ("rollback-frequency", qpid::optValue(rollbackFrequency, "N"), "rollback frequency (0 implies no transaction will be rolledback)") ("failover-updates", qpid::optValue(failoverUpdates), "Listen for membership updates distributed via amq.failover") - ("report", qpid::optValue(report), "Report throughput statistics") + ("report-total", qpid::optValue(reportTotal), "Report total throughput statistics") ("report-every", qpid::optValue(reportEvery,"N"), "Report throughput statistics every N messages") ("rate", qpid::optValue(rate,"N"), "Send at rate of N messages/second. 0 means send as fast as possible.") ("help", qpid::optValue(help), "print this usage statement"); @@ -269,7 +269,7 @@ int main(int argc, char ** argv) qpid::sys::usleep(delay/qpid::sys::TIME_USEC); } } - if (opts.report) reporter.report(); + if (opts.reportTotal) reporter.report(); for (uint i = opts.sendEos; i > 0; --i) { msg.getProperties()["sn"] = ++sent; msg.setContent(EOS);//TODO: add in ability to send digest or similar |