mantis 8520: make YEngine tick script events per second stat

This commit is contained in:
UbitUmarov
2021-04-22 00:40:45 +01:00
parent 1dc568749f
commit 84027166c8
3 changed files with 7 additions and 1 deletions

View File

@@ -1971,6 +1971,11 @@ namespace OpenSim.Region.Framework.Scenes
Interlocked.Add(ref m_scriptExecutionTime, ticks);
}
public void AddScriptEvents(int cntr)
{
StatsReporter.addScriptEvents(cntr);
}
/// <summary>
/// Returns the total execution time of all the scripts in the region since the last call
/// (in milliseconds), and clears the value in preparation for the next call.

View File

@@ -783,7 +783,7 @@ namespace OpenSim.Region.Framework.Scenes
public void addScriptEvents(int count)
{
m_scriptEventsPerSecond += count;
Interlocked.Add(ref m_scriptEventsPerSecond, count);
}
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)

View File

@@ -1705,6 +1705,7 @@ namespace OpenSim.Region.ScriptEngine.Yengine
inst.m_IState = XMRInstState.IDLE;
Monitor.Exit(inst.m_QueueLock);
}
m_Scene.AddScriptEvents(1);
break;
// Its m_SuspendCount > 0.