diff options
Diffstat (limited to 'cpp/src')
| -rw-r--r-- | cpp/src/tests/qpid-latency-test.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/cpp/src/tests/qpid-latency-test.cpp b/cpp/src/tests/qpid-latency-test.cpp index 2343cb1d77..ba53ba0459 100644 --- a/cpp/src/tests/qpid-latency-test.cpp +++ b/cpp/src/tests/qpid-latency-test.cpp @@ -368,13 +368,15 @@ void Sender::sendByRate() async(session).messageTransfer(arg::content=msg, arg::acceptMode=1); if (opts.sync) session.sync(); ++sent; - if (Duration(last, sentAt) > TIME_SEC*2) { + if (Duration(last, sentAt) > (opts.reportFrequency*TIME_MSEC)) { Duration t(start, now()); //check rate actually achieved thus far - uint actualRate = sent / (t/TIME_SEC); - //report inability to stay within 1% of desired rate - if (actualRate < opts.rate && opts.rate - actualRate > opts.rate/100) { - std::cerr << "WARNING: Desired send rate: " << opts.rate << ", actual send rate: " << actualRate << std::endl; + if (t/TIME_SEC) { + uint actualRate = sent / (t/TIME_SEC); + //report inability to stay within 1% of desired rate + if (actualRate < opts.rate && opts.rate - actualRate > opts.rate/100) { + std::cerr << "WARNING: Desired send rate: " << opts.rate << ", actual send rate: " << actualRate << std::endl; + } } last = sentAt; } |
