Initial thpt calc for ZMQ flows

This commit is contained in:
Simone Mainardi 2018-06-21 12:49:40 +02:00
parent d4ad9dae90
commit 3bc4312ed1
2 changed files with 13 additions and 10 deletions

View file

@ -345,14 +345,14 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
record["column_bytes"] = bytesToSize(value["bytes"])..""
local column_thpt = ''
if(throughput_type == "pps") then
column_thpt = column_thpt..pktsToSize(value["throughput_pps"]).. " "
else
column_thpt = column_thpt..bitsToSize(8*value["throughput_bps"]).. " "
end
if((value["throughput_trend_"..throughput_type] ~= nil)
and (value["throughput_trend_"..throughput_type] > 0)) then
if(throughput_type == "pps") then
column_thpt = column_thpt..pktsToSize(value["throughput_pps"]).. " "
else
column_thpt = column_thpt..bitsToSize(8*value["throughput_bps"]).. " "
end
if(value["throughput_trend_"..throughput_type] == 1) then
column_thpt = column_thpt.."<i class='fa fa-arrow-up'></i>"
elseif(value["throughput_trend_"..throughput_type] == 2) then
@ -360,9 +360,6 @@ for _key, value in ipairs(flows_stats) do -- pairsByValues(vals, funct) do
elseif(value["throughput_trend_"..throughput_type] == 3) then
column_thpt = column_thpt.."<i class='fa fa-minus'></i>"
end
else
column_thpt = "0 "..throughput_type
end
record["column_thpt"] = column_thpt