Skip to content
Snippets Groups Projects
Commit 645773b1 authored by Robin Obůrka's avatar Robin Obůrka
Browse files

Fix collected value and add some additional value check

parent 4ab805d6
Branches
No related merge requests found
......@@ -101,14 +101,14 @@ local function stats_update(stats, file)
if val > stats['load_max'] then stats['load_max'] = val; end;
stats['load_sum'] = stats['load_sum'] + val;
stats['load_samples'] = stats['load_samples'] + 1;
elseif items[2] == "fs" and items[3] ~= "0" then
elseif items[2] == "fs" and items[3] ~= "0" and items[4] ~≃ "0" then
local val = tonumber(items[4]);
if val < stats['fs_min'] then stats['fs_min'] = val; end;
if val > stats['fs_max'] then stats['fs_max'] = val; end;
stats['fs_sum'] = stats['fs_sum'] + val;
stats['fs_samples'] = stats['fs_samples'] + 1;
elseif items[2] == "memory" and items[3] ~= "0" then
local val = tonumber(items[3]);
elseif items[2] == "memory" and items[3] ~= "0" and items[4] ~= "0" then
local val = tonumber(items[4]);
if val < stats['mem_min'] then stats['mem_min'] = val; end;
if val > stats['mem_max'] then stats['mem_max'] = val; end;
stats['mem_sum'] = stats['mem_sum'] + val;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment