Log scripts that have processed many events: this is probably an indication of a problem

0.8.2-post-fixes
Oren Hurvitz 2015-07-17 16:27:40 +03:00
parent aadd5627fe
commit 4c6fb9fb64
1 changed files with 8 additions and 0 deletions

View File

@ -932,6 +932,14 @@ namespace OpenSim.Region.ScriptEngine.Shared.Instance
{ {
EventsProcessed++; 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) if (EventQueue.Count > 0 && Running && !ShuttingDown)
{ {
m_CurrentWorkItem = Engine.QueueEventHandler(this); m_CurrentWorkItem = Engine.QueueEventHandler(this);