feat(perf): indbygget profiler — måler alle indgange (hooks, update, GUI), logger top-6 pr. minut ved > 2 ms
This commit is contained in:
@@ -1184,11 +1184,16 @@ function ADSmartPickup:loadMap()
|
||||
end
|
||||
|
||||
function ADSmartPickup:update(dt)
|
||||
if ADProfiler ~= nil and ADProfiler.installed then
|
||||
local now = ADProfiler.clock()
|
||||
if now ~= nil then pcall(ADProfiler.frame, now) end
|
||||
end
|
||||
if not isHooked then
|
||||
local adEnv = getAutoDriveEnv()
|
||||
if adEnv ~= nil and g_currentMission ~= nil and g_currentMission.storageSystem ~= nil then
|
||||
installHook(adEnv)
|
||||
isHooked = true
|
||||
if ADProfiler ~= nil then pcall(ADProfiler.install) end
|
||||
if ADRunsController ~= nil then
|
||||
pcall(ADRunsController.load, adEnv)
|
||||
pcall(ADRunsController.installSaveHook)
|
||||
|
||||
Reference in New Issue
Block a user