diff --git a/src/designs/neutron/snabbnfv-traffic b/src/designs/neutron/snabbnfv-traffic index 4868455c13..858204ea5f 100755 --- a/src/designs/neutron/snabbnfv-traffic +++ b/src/designs/neutron/snabbnfv-traffic @@ -14,6 +14,7 @@ end function run (pciaddr, confpath, sockpath) engine.log = true local mtime = 0 + local report_time = 0 while true do local mtime2 = C.stat_mtime(confpath) if mtime2 ~= mtime then @@ -21,13 +22,14 @@ function run (pciaddr, confpath, sockpath) config.apply(config.load(confpath, pciaddr, sockpath)) mtime = mtime2 end - for i = 1, 60 do - engine.main({duration=1}) - -- Flush buffered log messages every 1s - io.flush() - end + engine.main({duration=1}) + -- Flush buffered log messages every 1s + io.flush() -- Report each minute - engine.report() + if (mtime2 - report_time) >= 60 then + engine.report() + report_time = mtime2 + end end end