From: Bert Hubert Date: Tue, 18 Nov 2008 20:08:44 +0000 (+0000) Subject: Closes ticket 26: no longer print 1e2%. Thanks to Joe Sipek X-Git-Tag: rec-3.2~219 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=dcc65f259b6b3ae92ada1cadbe203c5dca76c891;p=pdns Closes ticket 26: no longer print 1e2%. Thanks to Joe Sipek git-svn-id: svn://svn.powerdns.com/pdns/trunk/pdns@1303 d19b8d6e-7fed-0310-83ef-9ca221ded41b --- diff --git a/pdns/ws.cc b/pdns/ws.cc index b85365c50..f9eeac8b9 100644 --- a/pdns/ws.cc +++ b/pdns/ws.cc @@ -22,6 +22,7 @@ #include "misc.hh" #include "arguments.hh" #include "dns.hh" +#include extern StatBag S; @@ -103,12 +104,12 @@ void printtable(ostringstream &ret, const string &ringname, const string &title, int printed=0; for(vector >::const_iterator i=ring.begin();limit && i!=ring.end();++i,--limit) { - ret<<""<first<<""<second<<""<second*100.0/tot<<"%"<"<first<<""<second<<""<< (boost::format("%.01f") % (i->second*100.0/tot))<<"%"<second; } ret<<""<Rest:"<"<"<Rest:"<"<< (boost::format("%.01f") % ((tot-printed)*100.0/tot))<<"%"<Total:"<100%"; ret<<"

"<