Comparison

plugins/mod_admin_telnet.lua @ 9411:62c876e333e4

mod_admin_telnet: Guard against missing table field
author Kim Alvefur <zash@zash.se>
date Sun, 30 Sep 2018 14:55:39 +0200
parent 9410:7355b2d0067c
child 9454:6780049be177
comparison
equal deleted inserted replaced
9410:7355b2d0067c 9411:62c876e333e4
1326 local name, type, value, data = unpack(stat_info, 1, 4); 1326 local name, type, value, data = unpack(stat_info, 1, 4);
1327 local function print(s) 1327 local function print(s)
1328 table.insert(stat_info.output, s); 1328 table.insert(stat_info.output, s);
1329 end 1329 end
1330 1330
1331 if data and data.sample_count > 0 then 1331 if data and data.sample_count and data.sample_count > 0 then
1332 local raw_histogram = require "util.statistics".get_histogram(data); 1332 local raw_histogram = require "util.statistics".get_histogram(data);
1333 1333
1334 local graph_width, graph_height = 50, 10; 1334 local graph_width, graph_height = 50, 10;
1335 local eighth_chars = " ▁▂▃▄▅▆▇█"; 1335 local eighth_chars = " ▁▂▃▄▅▆▇█";
1336 1336