Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use defined evaluation order in profiler
  • Loading branch information
TurkeyMcMac authored and sfan5 committed Dec 19, 2021
1 parent 49f7d24 commit 1b664dd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions builtin/profiler/instrumentation.lua
Expand Up @@ -102,8 +102,9 @@ local function instrument(def)
-- also called https://en.wikipedia.org/wiki/Continuation_passing_style
-- Compared to table creation and unpacking it won't lose `nil` returns
-- and is expected to be faster
-- `measure` will be executed after time() and func(...)
return measure(modname, instrument_name, time(), func(...))
-- `measure` will be executed after func(...)
local start = time()
return measure(modname, instrument_name, start, func(...))
end
end

Expand Down

0 comments on commit 1b664dd

Please sign in to comment.