From ec765de7e55893c24792c95c1356bfad67e02034 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 5 Dec 2012 23:41:50 +0000 Subject: Add engine-wide events queued and events processed numbers to output of "xengine status" console command. For debugging purposes. --- OpenSim/Region/ScriptEngine/XEngine/XEngine.cs | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region') 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 StringBuilder sb = new StringBuilder(); sb.AppendFormat("Status of XEngine instance for {0}\n", m_Scene.RegionInfo.RegionName); + long scriptsLoaded, eventsQueued = 0, eventsProcessed = 0; + lock (m_Scripts) - sb.AppendFormat("Scripts loaded : {0}\n", m_Scripts.Count); + { + 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("Scripts waiting for load : {0}\n", m_CompileQueue.Count); 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("Work items waiting : {0}\n", m_ThreadPool.WaitingCallbacks); // 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); sb.AppendFormat("Sensors : {0}\n", sr != null ? sr.SensorsCount : 0); -- cgit v1.1