qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From c...@apache.org
Subject svn commit: r1405316 - in /qpid/trunk/qpid/cpp/src/qpid/sys: Timer.cpp TimerWarnings.cpp
Date Sat, 03 Nov 2012 10:21:59 GMT
Author: chug
Date: Sat Nov  3 10:21:59 2012
New Revision: 1405316

URL: http://svn.apache.org/viewvc?rev=1405316&view=rev
Log:
QPID-4403 review 7810 Too many 'task late and overran' messages
Demote TimerWarning messages to debug level.
Print them only once per minute.
To enable only these messages when broker is otherwise at INFO log level:
--log-enable debug+:Timer


Modified:
    qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp
    qpid/trunk/qpid/cpp/src/qpid/sys/TimerWarnings.cpp

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp?rev=1405316&r1=1405315&r2=1405316&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/Timer.cpp Sat Nov  3 10:21:59 2012
@@ -107,7 +107,7 @@ Timer::Timer() :
     late(50 * TIME_MSEC),
     overran(2 * TIME_MSEC),
     lateCancel(500 * TIME_MSEC),
-    warn(5 * TIME_SEC)
+    warn(60 * TIME_SEC)
 {
     start();
 }
@@ -171,8 +171,8 @@ void Timer::run()
                 if (!tasks.empty()) {
                     overrun = Duration(tasks.top()->nextFireTime, end);
                 }
-                bool warningsEnabled;
-                QPID_LOG_TEST(warning, warningsEnabled);
+                bool warningsEnabled;                  // TimerWarning enabled
+                QPID_LOG_TEST(debug, warningsEnabled); // TimerWarning emitted at debug level
                 if (warningsEnabled) {
                     if (overrun > overran) {
                         if (delay > overran) // if delay is significant to an overrun.

Modified: qpid/trunk/qpid/cpp/src/qpid/sys/TimerWarnings.cpp
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/qpid/sys/TimerWarnings.cpp?rev=1405316&r1=1405315&r2=1405316&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/qpid/sys/TimerWarnings.cpp (original)
+++ qpid/trunk/qpid/cpp/src/qpid/sys/TimerWarnings.cpp Sat Nov  3 10:21:59 2012
@@ -56,18 +56,18 @@ void TimerWarnings::log() {
             std::string task = i->first;
             TaskStats& stats = i->second;
             if (stats.lateDelay.count)
-                QPID_LOG(info, task << " task late "
+                QPID_LOG(debug, task << " task late "
                          << stats.lateDelay.count << " times by "
                          << stats.lateDelay.average()/TIME_MSEC << "ms on average.");
 
             if (stats.overranOverrun.count)
-                QPID_LOG(info, task << " task overran "
+                QPID_LOG(debug, 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(info, task << " task late and overran "
+                QPID_LOG(debug, task << " task late and overran "
                          << stats.lateAndOverranOverrun.count << " times: late
"
                          << stats.lateAndOverranDelay.average()/TIME_MSEC <<
"ms, overran "
                          << stats.lateAndOverranOverrun.average()/TIME_MSEC <<
"ms (taking "



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message