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