view Test.lua @ 178:38cc9221202d

Added a test page used to determine loading times.
author Zerotorescue
date Sun, 30 Jan 2011 15:40:16 +0100
parents
children
line wrap: on
line source
-- Loading time (in seconds)
print("Data loaded in: " .. GetTime() - IMStartLoadTime .. " seconds.");
IMStartLoadTime = nil;

local currentMem = collectgarbage("count");

-- Memory usage for addon (in kbytes)
print("Memory gained since start of loading: " .. (currentMem - IMStartLoadMemory) .. " kbytes.");
IMStartLoadMemory = nil;

-- Collect garbage
collectgarbage("collect");

-- Memory usage for this addon after trash was emptied
print("Memory gained since start of loading after garbage collection: " .. (currentMem - collectgarbage("count")) .. " kbytes.");