Module: check_mk
Branch: master
Commit: c6e700930fde9b66b203b6943e228dce19a2a807
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=c6e700930fde9b…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Sep 25 16:57:50 2017 +0200
EC: Log processing time of status queries in verbose mode
Change-Id: I840f279532e9f83275587a23db7cf490eb8d4757
---
bin/mkeventd | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/bin/mkeventd b/bin/mkeventd
index e753e84..eb7ca66 100755
--- a/bin/mkeventd
+++ b/bin/mkeventd
@@ -3210,7 +3210,10 @@ class StatusServer(object):
self.handle_client(client_socket, allow_commands,
addr_info and addr_info[0] or "")
- g_perfcounters.count_time("request", time.time() - before)
+
+ duration = time.time() - before
+ verbose("Answered request in %0.2f ms" % (duration*1000))
+ g_perfcounters.count_time("request", duration)
except Exception as e:
self.logger.exception("Error handling client %s: %s" %
(addr_info, e))