Quantcast

Track the total number of times a script has been compiled.

Johnny C. Lam [05-14-14 - 00:36]
Track the total number of times a script has been compiled.

git-svn-id: svn://svn.curseforge.net/wow/ovale/mainline/trunk@1433 d5049fe3-3747-40f7-a4b5-f36d6801af5f
Filename
OvaleCompile.lua
diff --git a/OvaleCompile.lua b/OvaleCompile.lua
index 4b580cc..6ae59f4 100644
--- a/OvaleCompile.lua
+++ b/OvaleCompile.lua
@@ -58,6 +58,8 @@ local self_compileOnStances = false

 -- Current age of compilation state.
 local self_serial = 0
+-- Number of times the script has been compiled.
+local self_compileCount = 0
 -- Master nodes of the current script (one node for each icon)
 local self_masterNodes = {}

@@ -936,6 +938,7 @@ function OvaleCompile:Compile()
 		code = ""
 	end
 	CompileScript(code)
+	self_compileCount = self_compileCount + 1
 	Ovale:UpdateFrame()
 end

@@ -951,6 +954,7 @@ end
 function OvaleCompile:Debug()
 	self_pool:Debug()
 	Ovale:Print(self:DebugNode(self_masterNodes[1]))
+	Ovale:FormatPrint("Total number of script compilations: %d", self_compileCount)
 end

 function OvaleCompile:DebugNode(node)