Compare with Previous | Blame | View Log
--[[
Addon: Taos Debug Tools
Author: TProg Taonnor
Created by @Taonnor
]]--
DebugTools = {}
DebugTools.LuaMB = 0
function DebugTools.GetCurrentLuaMemoryMB()
return math.floor(collectgarbage("count") / 1024 + 0.5)
end
function DebugTools.OnUpdate()
-- Show lua MB
local newMB = DebugTools.GetCurrentLuaMemoryMB()
if (newMB ~= DebugTools.LuaMB) then
d("Lua MB changed " .. newMB)
DebugTools.LuaMB = newMB
end
end
-- Register Updates
EVENT_MANAGER:RegisterForUpdate("TaosDebugToolsUpdate", 1000, DebugTools.OnUpdate)