From 4c6fb9fb64f554e22d33c30729b4922cdfd185e5 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Fri, 17 Jul 2015 16:27:40 +0300 Subject: Log scripts that have processed many events: this is probably an indication of a problem --- OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Region') diff --git a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs index d78738f..0055322 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Instance/ScriptInstance.cs @@ -932,6 +932,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance { EventsProcessed++; + if ((EventsProcessed == 1000) || (EventsProcessed == 10000) || ((EventsProcessed % 100000) == 0)) + { + m_log.DebugFormat("[SCRIPT INSTANCE]: Script \"{0}\" (Object \"{1}\" {2} @ {3}.{4}, Item ID {5}, Asset {6}) in event {7}: processed {8:n0} script events", + ScriptTask.Name, + Part.ParentGroup.Name, Part.ParentGroup.UUID, Part.ParentGroup.AbsolutePosition, Part.ParentGroup.Scene.Name, + ScriptTask.ItemID, ScriptTask.AssetID, data.EventName, EventsProcessed); + } + if (EventQueue.Count > 0 && Running && !ShuttingDown) { m_CurrentWorkItem = Engine.QueueEventHandler(this); -- cgit v1.1