Mercurial > wow > inventory
annotate 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 |
rev | line source |
---|---|
Zerotorescue@178 | 1 -- Loading time (in seconds) |
Zerotorescue@178 | 2 print("Data loaded in: " .. GetTime() - IMStartLoadTime .. " seconds."); |
Zerotorescue@178 | 3 IMStartLoadTime = nil; |
Zerotorescue@178 | 4 |
Zerotorescue@178 | 5 local currentMem = collectgarbage("count"); |
Zerotorescue@178 | 6 |
Zerotorescue@178 | 7 -- Memory usage for addon (in kbytes) |
Zerotorescue@178 | 8 print("Memory gained since start of loading: " .. (currentMem - IMStartLoadMemory) .. " kbytes."); |
Zerotorescue@178 | 9 IMStartLoadMemory = nil; |
Zerotorescue@178 | 10 |
Zerotorescue@178 | 11 -- Collect garbage |
Zerotorescue@178 | 12 collectgarbage("collect"); |
Zerotorescue@178 | 13 |
Zerotorescue@178 | 14 -- Memory usage for this addon after trash was emptied |
Zerotorescue@178 | 15 print("Memory gained since start of loading after garbage collection: " .. (currentMem - collectgarbage("count")) .. " kbytes."); |