mirror of
https://github.com/ntop/ntopng.git
synced 2026-04-29 07:29:32 +00:00
Optimizes flow callbacks (saves 24 bytes per flow)
This commit is contained in:
parent
286d2cfdbc
commit
02934faf6e
3 changed files with 2 additions and 22 deletions
|
|
@ -2907,12 +2907,12 @@ function formatElephantAlertType(flowalert_info)
|
|||
|
||||
local l2r_bytes = bytesToSize(flowalert_info["l2r_bytes"])
|
||||
|
||||
if flowalert_info["l2r_bytes"] > flowalert_info["l2r_threshold"] and flowalert_info["l2r_threshold"] > 0 then
|
||||
if flowalert_info["l2r_bytes"] > flowalert_info["l2r_threshold"] then
|
||||
l2r_bytes = l2r_bytes .." > "..bytesToSize(flowalert_info["l2r_threshold"])
|
||||
end
|
||||
|
||||
local r2l_bytes = bytesToSize(flowalert_info["r2l_bytes"])
|
||||
if flowalert_info["r2l_bytes"] > flowalert_info["r2l_threshold"] and flowalert_info["r2l_threshold"] > 0 then
|
||||
if flowalert_info["r2l_bytes"] > flowalert_info["r2l_threshold"] then
|
||||
r2l_bytes = r2l_bytes .. " > "..bytesToSize(flowalert_info["r2l_threshold"])
|
||||
end
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue