aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-12-05 22:33:28 +0000
committerJustin Clark-Casey (justincc)2012-12-05 22:33:46 +0000
commite8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c (patch)
tree11271357c58783e6efce2eafb078d17799829ecb
parentRemove very probably unused PrimitiveBaseShape(bool) constructor to reduce co... (diff)
downloadopensim-SC_OLD-e8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c.zip
opensim-SC_OLD-e8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c.tar.gz
opensim-SC_OLD-e8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c.tar.bz2
opensim-SC_OLD-e8df0f1b4c3194c7f5c1a354b5d5d2f67d6a250c.tar.xz
Add IScriptInstance.EventsProcessed stat so that we can record this information and display in "show scripts" for debug purposes
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs5
-rw-r--r--OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs4
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs1
3 files changed, 10 insertions, 0 deletions
diff --git a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
index b04f6b6..f3abd96 100644
--- a/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Interfaces/IScriptInstance.cs
@@ -114,6 +114,11 @@ namespace OpenSim.Region.ScriptEngine.Interfaces
114 UUID AssetID { get; } 114 UUID AssetID { get; }
115 Queue EventQueue { get; } 115 Queue EventQueue { get; }
116 116
117 /// <summary>
118 /// Number of events processed by this script instance.
119 /// </summary>
120 long EventsProcessed { get; }
121
117 void ClearQueue(); 122 void ClearQueue();
118 int StartParam { get; set; } 123 int StartParam { get; set; }
119 124
diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
index 5793cc9..5bfe97a 100644
--- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
+++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs
@@ -173,6 +173,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
173 173
174 public Queue EventQueue { get; private set; } 174 public Queue EventQueue { get; private set; }
175 175
176 public long EventsProcessed { get; private set; }
177
176 public int StartParam { get; set; } 178 public int StartParam { get; set; }
177 179
178 public TaskInventoryItem ScriptTask { get; private set; } 180 public TaskInventoryItem ScriptTask { get; private set; }
@@ -808,6 +810,8 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
808 // script engine to run the next event. 810 // script engine to run the next event.
809 lock (EventQueue) 811 lock (EventQueue)
810 { 812 {
813 EventsProcessed++;
814
811 if (EventQueue.Count > 0 && Running && !ShuttingDown) 815 if (EventQueue.Count > 0 && Running && !ShuttingDown)
812 { 816 {
813 m_CurrentWorkItem = Engine.QueueEventHandler(this); 817 m_CurrentWorkItem = Engine.QueueEventHandler(this);
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index d9d4494..2136fe8 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -512,6 +512,7 @@ namespace OpenSim.Region.ScriptEngine.XEngine
512 lock (eq) 512 lock (eq)
513 sb.AppendFormat("Queued events : {0}\n", eq.Count); 513 sb.AppendFormat("Queued events : {0}\n", eq.Count);
514 514
515 sb.AppendFormat("Processed events : {0}\n", instance.EventsProcessed);
515 sb.AppendFormat("Item UUID : {0}\n", instance.ItemID); 516 sb.AppendFormat("Item UUID : {0}\n", instance.ItemID);
516 sb.AppendFormat("Containing part name: {0}\n", instance.PrimName); 517 sb.AppendFormat("Containing part name: {0}\n", instance.PrimName);
517 sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID); 518 sb.AppendFormat("Containing part UUID: {0}\n", instance.ObjectID);