]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Use round() for uint64_t -> double conversions, default is to truncate
authorOtto <otto.moerbeek@open-xchange.com>
Fri, 19 Feb 2021 14:07:31 +0000 (15:07 +0100)
committerOtto <otto.moerbeek@open-xchange.com>
Fri, 19 Feb 2021 14:07:31 +0000 (15:07 +0100)
pdns/rec_channel_rec.cc

index be765cc090d756a46a4d132fb390fa10634703df..d84fc0f4e9584de3dc5809fe7274a3baf558204c 100644 (file)
@@ -1096,8 +1096,8 @@ static void registerAllStats1()
   addGetStat("auth6-answers100-1000", []() { return g_stats.auth6Answers.getCount(3); });
   addGetStat("auth6-answers-slow", []() { return g_stats.auth6Answers.getCount(4); });
 
-  addGetStat("qa-latency", []() { return g_stats.avgLatencyUsec.load(); });
-  addGetStat("x-our-latency", []() { return g_stats.avgLatencyOursUsec.load(); });
+  addGetStat("qa-latency", []() { return round(g_stats.avgLatencyUsec.load()); });
+  addGetStat("x-our-latency", []() { return round(g_stats.avgLatencyOursUsec.load()); });
   addGetStat("unexpected-packets", &g_stats.unexpectedCount);
   addGetStat("case-mismatches", &g_stats.caseMismatchCount);
   addGetStat("spoof-prevents", &g_stats.spoofCount);