diff options
-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 |