From 2b2ab383329aaaac3160656b2abe2fcc8ab42e79 Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 31 Jul 2017 10:17:28 +0200 Subject: [PATCH] dnsdist: Skip timeouts on the response latency graph --- pdns/dnsdist-lua.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pdns/dnsdist-lua.cc b/pdns/dnsdist-lua.cc index 84c51f0c2d..2a87d38f28 100644 --- a/pdns/dnsdist-lua.cc +++ b/pdns/dnsdist-lua.cc @@ -1461,10 +1461,14 @@ vector> setupLua(bool client, const std::string& confi } double totlat=0; - int size=0; + unsigned int size=0; { std::lock_guard lock(g_rings.respMutex); for(const auto& r : g_rings.respRing) { + /* skip actively discovered timeouts */ + if (r.usec == std::numeric_limits::max()) + continue; + ++size; auto iter = histo.lower_bound(r.usec); if(iter != histo.end()) -- 2.47.2