From 263d31bc7cf132ce67c4514743ef8f40784dd26e Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Sat, 8 Oct 2011 11:56:12 -0500 Subject: [PATCH] Added debug command --- ItemScanner.lua | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/ItemScanner.lua b/ItemScanner.lua index 72ffa1e..00ee536 100644 --- a/ItemScanner.lua +++ b/ItemScanner.lua @@ -242,7 +242,22 @@ local function itemParseCoroutine(start, tooltip, threadNumber) end local function commandHandler(msg) - if string.match(msg, "^items") then + if string.match(msg, "^debug") then + if IS_status.items.scan_active then + if IS_status.items.finished then + print("Scanning all items with " .. #(frame.itemco) .. " threads") + else + print("Scanning known valid items with " .. #(frame.itemco) .. " threads") + end + print("Last item: " .. tostring(IS_status.items.last_scanned or "none")) + local currentTime = GetTime() + print("roundTime = " .. tostring(currentTime - roundStartTime)) + print("elapsedTime = " .. tostring(currentTime - startTime)) + else + print("Scanning not active") + return + end + elseif string.match(msg, "^items") then local start if msg == "items" or msg == "items start" then @@ -296,6 +311,7 @@ local function commandHandler(msg) frame:SetScript("OnUpdate", OnUpdate) else print("Usage: /is (or /itemscanner ") + print(" debug prints scanning status") print(" items scans all items") end end -- 1.7.9.5