diff options
author | onefang | 2019-12-10 20:22:57 +1000 |
---|---|---|
committer | onefang | 2019-12-10 20:22:57 +1000 |
commit | 7070ac531abed5c2e6122c8ee7d0b677d3eeef96 (patch) | |
tree | 35798fc4d8123b94f9a950e6e616b3f4f440d1a7 | |
parent | Explain what "more graphs" is a little better. (diff) | |
download | apt-panopticon-7070ac531abed5c2e6122c8ee7d0b677d3eeef96.zip apt-panopticon-7070ac531abed5c2e6122c8ee7d0b677d3eeef96.tar.gz apt-panopticon-7070ac531abed5c2e6122c8ee7d0b677d3eeef96.tar.bz2 apt-panopticon-7070ac531abed5c2e6122c8ee7d0b677d3eeef96.tar.xz |
Clean up the graph a bit.
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index b291e44..6319d1e 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -268,15 +268,25 @@ count = 1 | |||
268 | for k, v in APT.orderedPairs(mirrors) do | 268 | for k, v in APT.orderedPairs(mirrors) do |
269 | if 'deb.devuan.org' ~= k then | 269 | if 'deb.devuan.org' ~= k then |
270 | local c = colours[count] | 270 | local c = colours[count] |
271 | local name = string.format('%32s', k) | ||
271 | if 'pkgmaster.devuan.org' == k then c = 'ffffff' end | 272 | if 'pkgmaster.devuan.org' == k then c = 'ffffff' end |
272 | table.insert(g, 'DEF:speed' .. count .. '=rrd/' .. k .. '/HTTP/Speed.rrd:max:LAST') | 273 | table.insert(g, 'DEF:speedn' .. count .. '=rrd/' .. k .. '/HTTP/Speed.rrd:max:MIN') |
273 | table.insert(g, 'VDEF:vspeed' .. count .. '=speed' .. count .. ',AVERAGE') | 274 | table.insert(g, 'DEF:speedx' .. count .. '=rrd/' .. k .. '/HTTP/Speed.rrd:max:MAX') |
274 | table.insert(g, 'LINE2:speed' .. count .. '#' .. c .. ':' .. k .. '\t') | 275 | table.insert(g, 'DEF:speeda' .. count .. '=rrd/' .. k .. '/HTTP/Speed.rrd:max:AVERAGE') |
275 | table.insert(g, 'GPRINT:vspeed' .. count .. ':%5.1lf%s\\l') | 276 | table.insert(g, 'DEF:speedl' .. count .. '=rrd/' .. k .. '/HTTP/Speed.rrd:max:LAST') |
277 | table.insert(g, 'VDEF:vspeedn' .. count .. '=speedn' .. count .. ',AVERAGE') | ||
278 | table.insert(g, 'VDEF:vspeedx' .. count .. '=speedx' .. count .. ',AVERAGE') | ||
279 | table.insert(g, 'VDEF:vspeeda' .. count .. '=speeda' .. count .. ',AVERAGE') | ||
280 | table.insert(g, 'VDEF:vspeedl' .. count .. '=speedl' .. count .. ',AVERAGE') | ||
281 | table.insert(g, 'LINE2:speedx' .. count .. '#' .. c .. ':' .. name .. ' ') | ||
282 | table.insert(g, 'GPRINT:vspeedn' .. count .. ':Min %5.1lf%s,') | ||
283 | table.insert(g, 'GPRINT:vspeeda' .. count .. ':Avg %5.1lf%s,') | ||
284 | table.insert(g, 'GPRINT:vspeedx' .. count .. ':Max %5.1lf%s,') | ||
285 | table.insert(g, 'GPRINT:vspeedl' .. count .. ':Last %5.1lf%s\\l') | ||
276 | count = count + 1 | 286 | count = count + 1 |
277 | end | 287 | end |
278 | end | 288 | end |
279 | APT.rrd.graph('results/speed.png', '--start', 'now-2w', '--end', 'now', '-t', 'Speed', '-v', 'bytes per second', '-w', '900', '-h', '400', '-Z', | 289 | APT.rrd.graph('results/speed.png', '--start', 'now-2w', '--end', 'now', '-t', 'Speed, rough maximum guess.', '-v', 'bytes per second', '-w', '900', '-h', '400', '-Z', |
280 | '-c', 'BACK#000000', '-c', 'CANVAS#000000', '-c', 'FONT#FFFFFF', '-c', 'AXIS#FFFFFF', '-c', 'FRAME#FFFFFF', '-c', 'ARROW#FFFFFF', | 290 | '-c', 'BACK#000000', '-c', 'CANVAS#000000', '-c', 'FONT#FFFFFF', '-c', 'AXIS#FFFFFF', '-c', 'FRAME#FFFFFF', '-c', 'ARROW#FFFFFF', |
281 | unpack(g)) | 291 | unpack(g)) |
282 | 292 | ||