Skip to content

Commit

Permalink
Hoist enable_auditlog out of loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dpino committed Apr 24, 2018
1 parent 044a458 commit 92adb41
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib/ptree/worker.lua
Expand Up @@ -100,6 +100,8 @@ function Worker:main ()
engine.setvmprofile("engine")
vmprofile.start()

if not engine.auditlog_enabled then engine.enable_auditlog() end

repeat
self.breathe()
if next_time < engine.now() then
Expand All @@ -108,7 +110,6 @@ function Worker:main ()
timer.run()
end
if not engine.busywait then engine.pace_breathing() end
if not engine.auditlog_enabled then engine.enable_auditlog() end
until stop < engine.now()
counter.commit()
if not self.no_report then engine.report(self.report) end
Expand Down

0 comments on commit 92adb41

Please sign in to comment.