From: Remi Gacogne Date: Mon, 31 Jul 2017 08:17:28 +0000 (+0200) Subject: dnsdist: Skip timeouts on the response latency graph X-Git-Tag: dnsdist-1.2.0~50^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=refs%2Fpull%2F5563%2Fhead;p=thirdparty%2Fpdns.git dnsdist: Skip timeouts on the response latency graph --- 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())