aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-12-05 23:41:50 +0000
committerJustin Clark-Casey (justincc)2012-12-05 23:41:50 +0000
commitec765de7e55893c24792c95c1356bfad67e02034 (patch)
tree7afed2f6fa889db47117351f20d20f8a42bfdf62 /OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
parentRemove some mono warnings in script tests, chiefly where SetUp() wasn't prope... (diff)
downloadopensim-SC_OLD-ec765de7e55893c24792c95c1356bfad67e02034.zip
opensim-SC_OLD-ec765de7e55893c24792c95c1356bfad67e02034.tar.gz
opensim-SC_OLD-ec765de7e55893c24792c95c1356bfad67e02034.tar.bz2
opensim-SC_OLD-ec765de7e55893c24792c95c1356bfad67e02034.tar.xz
Add engine-wide events queued and events processed numbers to output of "xengine status" console command. For debugging purposes.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/XEngine/XEngine.cs')
-rw-r--r--OpenSim/Region/ScriptEngine/XEngine/XEngine.cs15
1 files changed, 14 insertions, 1 deletions
diff --git a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
index aeb807c..965101a 100644
--- a/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
+++ b/OpenSim/Region/ScriptEngine/XEngine/XEngine.cs
@@ -455,9 +455,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
455 StringBuilder sb = new StringBuilder(); 455 StringBuilder sb = new StringBuilder();
456 sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName); 456 sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName);
457 457
458 long scriptsLoaded, eventsQueued = 0, eventsProcessed = 0;
459
458 lock (m_Scripts) 460 lock (m_Scripts)
459 sb.AppendFormat("Scripts loaded : {0}\n", m_Scripts.Count); 461 {
462 scriptsLoaded = m_Scripts.Count;
463
464 foreach (IScriptInstance si in m_Scripts.Values)
465 {
466 eventsQueued += si.EventsQueued;
467 eventsProcessed += si.EventsProcessed;
468 }
469 }
460 470
471 sb.AppendFormat("Scripts loaded : {0}\n", scriptsLoaded);
461 sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count); 472 sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count);
462 sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count); 473 sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count);
463 sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads); 474 sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads);
@@ -466,6 +477,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
466 sb.AppendFormat("In use threads : {0}\n", m_ThreadPool.InUseThreads); 477 sb.AppendFormat("In use threads : {0}\n", m_ThreadPool.InUseThreads);
467 sb.AppendFormat("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks); 478 sb.AppendFormat("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks);
468// sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count); 479// sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count);
480 sb.AppendFormat("Events queued : {0}\n", eventsQueued);
481 sb.AppendFormat("Events processed : {0}\n", eventsProcessed);
469 482
470 SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this); 483 SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this);
471 sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0); 484 sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0);