diff options
| author | Alan Conway <aconway@apache.org> | 2011-09-02 13:36:51 +0000 |
|---|---|---|
| committer | Alan Conway <aconway@apache.org> | 2011-09-02 13:36:51 +0000 |
| commit | c0251644cc9cfb0ebca707ada2cd26b2adac5b77 (patch) | |
| tree | b75f877a0cebc48d7192e7383c8459c092c6d723 /qpid/cpp/src/tests/qpid-receive.cpp | |
| parent | 6d882c19e689954c5da2a41173334216d1ce5a76 (diff) | |
| download | qpid-python-qpid-2920.tar.gz | |
QPID-2920: Clean up of debugging messages, install test exes.qpid-2920
git-svn-id: https://svn.apache.org/repos/asf/qpid/branches/qpid-2920@1164528 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp/src/tests/qpid-receive.cpp')
| -rw-r--r-- | qpid/cpp/src/tests/qpid-receive.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/qpid/cpp/src/tests/qpid-receive.cpp b/qpid/cpp/src/tests/qpid-receive.cpp index 9c713e872a..fc33685407 100644 --- a/qpid/cpp/src/tests/qpid-receive.cpp +++ b/qpid/cpp/src/tests/qpid-receive.cpp @@ -190,13 +190,20 @@ int main(int argc, char ** argv) session.createSender(opts.readyAddress).send(msg); // For receive rate calculation - qpid::sys::AbsTime start = qpid::sys::now(); + qpid::sys::AbsTime start; // Will be set on first itertion. + bool started=false; int64_t interval = 0; if (opts.receiveRate) interval = qpid::sys::TIME_SEC/opts.receiveRate; std::map<std::string,Sender> replyTo; while (!done && receiver.fetch(msg, timeout)) { + if (!started) { + // Start the time on receipt of the first message to avoid counting + // idle time at process startup. + start = qpid::sys::AbsTime::now(); + started = true; + } reporter.message(msg); if (!opts.ignoreDuplicates || !sequenceTracker.isDuplicate(msg)) { if (msg.getContent() == EOS) { |
