From 4823616e63bd9fec3a7c825c9a5b01917851f951 Mon Sep 17 00:00:00 2001 From: onefang Date: Fri, 27 Dec 2019 22:24:31 +1000 Subject: More precision for the weekly stats. --- apt-panopticon-report-email-web.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apt-panopticon-report-email-web.lua') diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index abac63c..2a13e29 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua @@ -450,7 +450,7 @@ if nil == web then C("opening mirrors file - " .. e) else end end end - percentUp = string.format('%d', up / count * 100) + percentUp = string.format('%.2f', up / count * 100) end if APT.checkFile('rrd/' .. k .. '/HTTP/Tests.rrd') then local start, step, names, data = APT.rrd.fetch('rrd/' .. k .. '/HTTP/Tests.rrd', 'LAST', '-a', '-r', '10m', '-s', '-1w') @@ -467,7 +467,7 @@ if nil == web then C("opening mirrors file - " .. e) else end end end - percentUpdated = string.format('%d', (down / count * 100)) + percentUpdated = string.format('%.2f', (down / count * 100)) if '0' == percentUp then percentUpdated = '??' end -- We are counting errors, and you can't get an error if you can't check anything. -- TODO - try to account for this better, this is just a quick hack. end -- cgit v1.1