From 29d78f7e3a730d650feb365db1c4ccc4267837b0 Mon Sep 17 00:00:00 2001 From: UbitUmarov Date: Tue, 8 Sep 2015 14:13:56 +0100 Subject: [PATCH] add script events per sec stat, using the time report code, but ignoring the time for nowwq --- OpenSim/Region/Framework/Scenes/Scene.cs | 1 + OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index 52e03b20ad..1b26cc3292 100755 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs @@ -1938,6 +1938,7 @@ namespace OpenSim.Region.Framework.Scenes /// Elapsed Stopwatch ticks public void AddScriptExecutionTime(long ticks) { + StatsReporter.addScriptEvents(1); Interlocked.Add(ref m_scriptExecutionTime, ticks); } diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 66cf14f133..de3c3d6f7c 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs @@ -230,6 +230,7 @@ namespace OpenSim.Region.Framework.Scenes private int m_pendingUploads = 0; // FIXME: Not currently filled in private int m_activeScripts; private int m_scriptLinesPerSecond; + private int m_scriptEventsPerSecond; private int m_objectCapacity = 45000; @@ -496,8 +497,8 @@ namespace OpenSim.Region.Framework.Scenes sb[27].StatID = (uint)Stats.PhysicsLodTasks; sb[27].StatValue = 0; - sb[28].StatID = (uint)Stats.ScriptEps; // we should have this - sb[28].StatValue = 0; + sb[28].StatID = (uint)Stats.ScriptEps; // we actuall have this, but not messing array order AGAIN + sb[28].StatValue = m_scriptEventsPerSecond * updateFactor; sb[29].StatID = (uint)Stats.SimAIStepTimeMS; sb[29].StatValue = 0; @@ -620,6 +621,7 @@ namespace OpenSim.Region.Framework.Scenes //m_outPacketsPerSecond = 0; m_unAckedBytes = 0; m_scriptLinesPerSecond = 0; + m_scriptEventsPerSecond = 0; m_frameMS = 0; m_agentMS = 0; @@ -756,6 +758,11 @@ namespace OpenSim.Region.Framework.Scenes m_scriptLinesPerSecond += count; } + public void addScriptEvents(int count) + { + m_scriptEventsPerSecond += count; + } + public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) { AddInPackets(inPackets);