Added tracing code

This commit is contained in:
Luca Deri 2022-08-30 00:07:16 +02:00
parent 2b90d42d0a
commit bbae6c3782
13 changed files with 76 additions and 1 deletions

View file

@ -7,6 +7,8 @@ package.path = dirs.installdir .. "/scripts/lua/modules/?.lua;" .. package.path
local cpu_utils = {}
local clock_start = os.clock()
-- #################################
local CPU_STATES_PREV_KEY = "ntopng.cache.system_utils.cpu_states.prev"
@ -155,5 +157,9 @@ end
-- #################################
if(trace_script_duration ~= nil) then
io.write(debug.getinfo(1,'S').source .." executed in ".. (os.clock()-clock_start)*1000 .. " ms\n")
end
return cpu_utils