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 2011/03/17 17:16:28 UTC
svn commit: r1082552 - in /qpid/branches/0.10/qpid/cpp/src/qpid/sys:
Timer.cpp TimerWarnings.cpp
Author: aconway
Date: Thu Mar 17 16:16:27 2011
New Revision: 1082552
URL: http://svn.apache.org/viewvc?rev=1082552&view=rev
Log:
NO-JIRA: Fix qpidd late/overran warnings.
Warnings for late-and-overrun tasks were not being correctly reported.
Lateness for overrun tasks below the late threshold were not being reported.
Modified:
qpid/branches/0.10/qpid/cpp/src/qpid/sys/Timer.cpp
qpid/branches/0.10/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
Modified: qpid/branches/0.10/qpid/cpp/src/qpid/sys/Timer.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.10/qpid/cpp/src/qpid/sys/Timer.cpp?rev=1082552&r1=1082551&r2=1082552&view=diff
==============================================================================
--- qpid/branches/0.10/qpid/cpp/src/qpid/sys/Timer.cpp (original)
+++ qpid/branches/0.10/qpid/cpp/src/qpid/sys/Timer.cpp Thu Mar 17 16:16:27 2011
@@ -131,12 +131,14 @@ void Timer::run()
bool warningsEnabled;
QPID_LOG_TEST(warning, warningsEnabled);
if (warningsEnabled) {
- if (delay > late && overrun > overran)
- warn.lateAndOverran(t->name, delay, overrun, Duration(start, end));
+ if (overrun > overran) {
+ if (delay > overran) // if delay is significant to an overrun.
+ warn.lateAndOverran(t->name, delay, overrun, Duration(start, end));
+ else
+ warn.overran(t->name, overrun, Duration(start, end));
+ }
else if (delay > late)
warn.late(t->name, delay);
- else if (overrun > overran)
- warn.overran(t->name, overrun, Duration(start, end));
}
continue;
} else {
Modified: qpid/branches/0.10/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
URL: http://svn.apache.org/viewvc/qpid/branches/0.10/qpid/cpp/src/qpid/sys/TimerWarnings.cpp?rev=1082552&r1=1082551&r2=1082552&view=diff
==============================================================================
--- qpid/branches/0.10/qpid/cpp/src/qpid/sys/TimerWarnings.cpp (original)
+++ qpid/branches/0.10/qpid/cpp/src/qpid/sys/TimerWarnings.cpp Thu Mar 17 16:16:27 2011
@@ -59,17 +59,19 @@ void TimerWarnings::log() {
QPID_LOG(warning, task << " task late "
<< stats.lateDelay.count << " times by "
<< stats.lateDelay.average()/TIME_MSEC << "ms on average.");
+
if (stats.overranOverrun.count)
QPID_LOG(warning, task << " task overran "
<< stats.overranOverrun.count << " times by "
<< stats.overranOverrun.average()/TIME_MSEC << "ms (taking "
<< stats.overranTime.average() << "ns) on average.");
- if (stats.lateAndOverranDelay.count)
- QPID_LOG(warning, task << " task overran "
- << stats.overranOverrun.count << " times by "
- << stats.overranOverrun.average()/TIME_MSEC << "ms (taking "
- << stats.overranTime.average() << "ns) on average.");
+ if (stats.lateAndOverranOverrun.count)
+ QPID_LOG(warning, task << " task late and overran "
+ << stats.lateAndOverranOverrun.count << " times: late "
+ << stats.lateAndOverranDelay.average()/TIME_MSEC << "ms, overran "
+ << stats.lateAndOverranOverrun.average()/TIME_MSEC << "ms (taking "
+ << stats.lateAndOverranTime.average() << "ns) on average.");
}
nextReport = AbsTime(now(), interval);
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org