add script events per sec stat, using the time report code, but ignoring the time for nowwq

avinationmerge
UbitUmarov 2015-09-08 14:13:56 +01:00
parent c4c6fcf7ad
commit 29d78f7e3a
2 changed files with 10 additions and 2 deletions

View File

@ -1938,6 +1938,7 @@ namespace OpenSim.Region.Framework.Scenes
/// <param name="ticks">Elapsed Stopwatch ticks</param> /// <param name="ticks">Elapsed Stopwatch ticks</param>
public void AddScriptExecutionTime(long ticks) public void AddScriptExecutionTime(long ticks)
{ {
StatsReporter.addScriptEvents(1);
Interlocked.Add(ref m_scriptExecutionTime, ticks); Interlocked.Add(ref m_scriptExecutionTime, ticks);
} }

View File

@ -230,6 +230,7 @@ namespace OpenSim.Region.Framework.Scenes
private int m_pendingUploads = 0; // FIXME: Not currently filled in private int m_pendingUploads = 0; // FIXME: Not currently filled in
private int m_activeScripts; private int m_activeScripts;
private int m_scriptLinesPerSecond; private int m_scriptLinesPerSecond;
private int m_scriptEventsPerSecond;
private int m_objectCapacity = 45000; private int m_objectCapacity = 45000;
@ -496,8 +497,8 @@ namespace OpenSim.Region.Framework.Scenes
sb[27].StatID = (uint)Stats.PhysicsLodTasks; sb[27].StatID = (uint)Stats.PhysicsLodTasks;
sb[27].StatValue = 0; sb[27].StatValue = 0;
sb[28].StatID = (uint)Stats.ScriptEps; // we should have this sb[28].StatID = (uint)Stats.ScriptEps; // we actuall have this, but not messing array order AGAIN
sb[28].StatValue = 0; sb[28].StatValue = m_scriptEventsPerSecond * updateFactor;
sb[29].StatID = (uint)Stats.SimAIStepTimeMS; sb[29].StatID = (uint)Stats.SimAIStepTimeMS;
sb[29].StatValue = 0; sb[29].StatValue = 0;
@ -620,6 +621,7 @@ namespace OpenSim.Region.Framework.Scenes
//m_outPacketsPerSecond = 0; //m_outPacketsPerSecond = 0;
m_unAckedBytes = 0; m_unAckedBytes = 0;
m_scriptLinesPerSecond = 0; m_scriptLinesPerSecond = 0;
m_scriptEventsPerSecond = 0;
m_frameMS = 0; m_frameMS = 0;
m_agentMS = 0; m_agentMS = 0;
@ -756,6 +758,11 @@ namespace OpenSim.Region.Framework.Scenes
m_scriptLinesPerSecond += count; m_scriptLinesPerSecond += count;
} }
public void addScriptEvents(int count)
{
m_scriptEventsPerSecond += count;
}
public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
{ {
AddInPackets(inPackets); AddInPackets(inPackets);