Author: gsim
Date: Mon May 27 17:06:13 2013
New Revision: 1486666
URL: http://svn.apache.org/r1486666
Log:
NO-JIRA: match the frequency of rate failure warnings to stats report frequency
Modified:
qpid/trunk/qpid/cpp/src/tests/qpid-latency-test.cpp
Modified: qpid/trunk/qpid/cpp/src/tests/qpid-latency-test.cpp
URL:
http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-latency-test.cpp?rev=1486666&r1=1486665&r2=1486666&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-latency-test.cpp (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-latency-test.cpp Mon May 27 17:06:13 2013
@@ -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;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]