diff options
author | onefang | 2019-12-27 22:24:31 +1000 |
---|---|---|
committer | onefang | 2019-12-27 22:24:31 +1000 |
commit | 4823616e63bd9fec3a7c825c9a5b01917851f951 (patch) | |
tree | 114572ee9925d4c0257616bde00a831a47bc772b | |
parent | Show question marks for Debian mirror weekly stats. (diff) | |
download | apt-panopticon-4823616e63bd9fec3a7c825c9a5b01917851f951.zip apt-panopticon-4823616e63bd9fec3a7c825c9a5b01917851f951.tar.gz apt-panopticon-4823616e63bd9fec3a7c825c9a5b01917851f951.tar.bz2 apt-panopticon-4823616e63bd9fec3a7c825c9a5b01917851f951.tar.xz |
More precision for the weekly stats.
Diffstat (limited to '')
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 4 |
1 files changed, 2 insertions, 2 deletions
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 | |||
450 | end | 450 | end |
451 | end | 451 | end |
452 | end | 452 | end |
453 | percentUp = string.format('%d', up / count * 100) | 453 | percentUp = string.format('%.2f', up / count * 100) |
454 | end | 454 | end |
455 | if APT.checkFile('rrd/' .. k .. '/HTTP/Tests.rrd') then | 455 | if APT.checkFile('rrd/' .. k .. '/HTTP/Tests.rrd') then |
456 | local start, step, names, data = APT.rrd.fetch('rrd/' .. k .. '/HTTP/Tests.rrd', 'LAST', '-a', '-r', '10m', '-s', '-1w') | 456 | 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 | |||
467 | end | 467 | end |
468 | end | 468 | end |
469 | end | 469 | end |
470 | percentUpdated = string.format('%d', (down / count * 100)) | 470 | percentUpdated = string.format('%.2f', (down / count * 100)) |
471 | if '0' == percentUp then percentUpdated = '??' end -- We are counting errors, and you can't get an error if you can't check anything. | 471 | if '0' == percentUp then percentUpdated = '??' end -- We are counting errors, and you can't get an error if you can't check anything. |
472 | -- TODO - try to account for this better, this is just a quick hack. | 472 | -- TODO - try to account for this better, this is just a quick hack. |
473 | end | 473 | end |