Add engine-wide events queued and events processed numbers to output of "xengine status" console command. For debugging purposes.

0.7.4-extended
Justin Clark-Casey (justincc) 2012-12-05 23:41:50 +00:00
parent ce1d3e9c96
commit 992dc1c2c7
1 changed files with 15 additions and 2 deletions

View File

@ -455,9 +455,20 @@ namespace OpenSim.Region.ScriptEngine.XEngine
StringBuilder sb = new StringBuilder(); StringBuilder sb = new StringBuilder();
sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName); sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName);
lock (m_Scripts) long scriptsLoaded, eventsQueued = 0, eventsProcessed = 0;
sb.AppendFormat("Scripts loaded : {0}\n", m_Scripts.Count);
lock (m_Scripts)
{
scriptsLoaded = m_Scripts.Count;
foreach (IScriptInstance si in m_Scripts.Values)
{
eventsQueued += si.EventsQueued;
eventsProcessed += si.EventsProcessed;
}
}
sb.AppendFormat("Scripts loaded : {0}\n", scriptsLoaded);
sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count); sb.AppendFormat("Unique scripts : {0}\n", m_uniqueScripts.Count);
sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count); sb.AppendFormat("Scripts waiting for load : {0}\n", m_CompileQueue.Count);
sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads); sb.AppendFormat("Max threads : {0}\n", m_ThreadPool.MaxThreads);
@ -466,6 +477,8 @@ namespace OpenSim.Region.ScriptEngine.XEngine
sb.AppendFormat("In use threads : {0}\n", m_ThreadPool.InUseThreads); sb.AppendFormat("In use threads : {0}\n", m_ThreadPool.InUseThreads);
sb.AppendFormat("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks); sb.AppendFormat("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks);
// sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count); // sb.AppendFormat("Assemblies loaded : {0}\n", m_Assemblies.Count);
sb.AppendFormat("Events queued : {0}\n", eventsQueued);
sb.AppendFormat("Events processed : {0}\n", eventsProcessed);
SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this); SensorRepeat sr = AsyncCommandManager.GetSensorRepeatPlugin(this);
sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0); sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0);