Content deleted Content added
dont sort if you dont have to |
allow specifying a custom MinTimeTaken |
||
(2 intermediate revisions by the same user not shown) | |||
Line 1:
-- In-depth execution speed benchmarker - read the /doc for more info
-- =================================================================== --
-- This is a meta-module that hooks
-- Be careful including this module outside of sandboxes --
-- =================================================================== --
-- Always use rawget/rawset on _G to bypass strict
Line 56 ⟶ 57:
FunctionTotalTimes[UniqueName] = FunctionTotalTimes[UniqueName] + CallTime
end
local MinTimeTaken = rawget(_G, "_MinTimeTaken") or 0.01
if TotalTimeTaken >
table.sort(SeenModules, function(a, b)
return ModuleTotalTimes[a] > ModuleTotalTimes[b]
Line 119 ⟶ 121:
end
end
return obj
end
rawset(_G, "_BenchmarkerHooker", HookTable)
|