qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject svn commit: r1083082 - in /qpid/branches/0.10/qpid/cpp/src/qpid/sys: Timer.cpp TimerWarnings.cpp
Date Fri, 18 Mar 2011 21:46:21 GMT
Author: aconway
Date: Fri Mar 18 21:46:20 2011
New Revision: 1083082

URL: http://svn.apache.org/viewvc?rev=1083082&view=rev
Log:
QPID-3154: 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=1083082&r1=1083081&r2=1083082&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 Fri Mar 18 21:46:20 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=1083082&r1=1083081&r2=1083082&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 Fri Mar 18 21:46:20 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


Mime
View raw message