diff options
Diffstat (limited to 'apt-panopticon-report-email-web.lua')
-rwxr-xr-x | apt-panopticon-report-email-web.lua | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/apt-panopticon-report-email-web.lua b/apt-panopticon-report-email-web.lua index ef61183..7d4b0fc 100755 --- a/apt-panopticon-report-email-web.lua +++ b/apt-panopticon-report-email-web.lua | |||
@@ -231,6 +231,57 @@ if nil == email then C("opening mirrors file - " .. e) else | |||
231 | end | 231 | end |
232 | 232 | ||
233 | 233 | ||
234 | local colours = | ||
235 | { | ||
236 | 'f0000080', | ||
237 | '0f000080', | ||
238 | '00f00080', | ||
239 | '000f0080', | ||
240 | '0000f080', | ||
241 | '00000f80', | ||
242 | '80000080', | ||
243 | '08000080', | ||
244 | '00800080', | ||
245 | '00080080', | ||
246 | '00008080', | ||
247 | '00000880', | ||
248 | 'ff000080', | ||
249 | '0ff00080', | ||
250 | '00ff0080', | ||
251 | '000ff080', | ||
252 | '0000ff80', | ||
253 | '88000080', | ||
254 | '08800080', | ||
255 | '00880080', | ||
256 | '00088080', | ||
257 | '00008880', | ||
258 | } | ||
259 | local g = {} | ||
260 | local count = 0 | ||
261 | for k, v in APT.orderedPairs(mirrors) do | ||
262 | if 'pkgmaster.devuan.org' ~= k then count = count + 1 end | ||
263 | end | ||
264 | for i = 1, count do | ||
265 | end | ||
266 | |||
267 | count = 1 | ||
268 | for k, v in APT.orderedPairs(mirrors) do | ||
269 | if 'deb.devuan.org' ~= k then | ||
270 | local c = colours[count] | ||
271 | 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, 'VDEF:vspeed' .. count .. '=speed' .. count .. ',AVERAGE') | ||
274 | table.insert(g, 'LINE2:speed' .. count .. '#' .. c .. ':' .. k .. '\t') | ||
275 | table.insert(g, 'GPRINT:vspeed' .. count .. ':%5.1lf%s\\l') | ||
276 | count = count + 1 | ||
277 | end | ||
278 | end | ||
279 | APT.rrd.graph('results/speed.png', '--start', 'now-1w', '--end', 'now', '-t', 'Speed', '-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', | ||
281 | unpack(g)) | ||
282 | |||
283 | |||
284 | |||
234 | results = {} | 285 | results = {} |
235 | m = {} | 286 | m = {} |
236 | faulty = "" | 287 | faulty = "" |