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 2010/04/07 22:51:05 UTC

svn commit: r931681 - in /qpid/trunk/qpid/cpp/src/tests: qpid_recv.cpp qpid_send.cpp

Author: aconway
Date: Wed Apr  7 20:51:05 2010
New Revision: 931681

URL: http://svn.apache.org/viewvc?rev=931681&view=rev
Log:
Fix ambiguous --report option in qpid_send, qpid_recv.

Modified:
    qpid/trunk/qpid/cpp/src/tests/qpid_recv.cpp
    qpid/trunk/qpid/cpp/src/tests/qpid_send.cpp

Modified: qpid/trunk/qpid/cpp/src/tests/qpid_recv.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid_recv.cpp?rev=931681&r1=931680&r2=931681&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid_recv.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid_recv.cpp Wed Apr  7 20:51:05 2010
@@ -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();

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=931681&r1=931680&r2=931681&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid_send.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid_send.cpp Wed Apr  7 20:51:05 2010
@@ -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



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