aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs11
2 files changed, 16 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5b13b73..3034f9a 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -387,6 +387,11 @@ namespace OpenSim.Region.Framework.Scenes
387 { 387 {
388 get { return StatsReporter.getLastReportedSimFPS(); } 388 get { return StatsReporter.getLastReportedSimFPS(); }
389 } 389 }
390
391 public float[] SimulatorStats
392 {
393 get { return StatsReporter.getLastReportedSimStats(); }
394 }
390 395
391 public string DefaultScriptEngine 396 public string DefaultScriptEngine
392 { 397 {
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index ee288b3..56c6ed6 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -82,6 +82,7 @@ namespace OpenSim.Region.Framework.Scenes
82 private int m_fps = 0; 82 private int m_fps = 0;
83 // saved last reported value so there is something available for llGetRegionFPS 83 // saved last reported value so there is something available for llGetRegionFPS
84 private float lastReportedSimFPS = 0; 84 private float lastReportedSimFPS = 0;
85 private float[] lastReportedSimStats = new float[21];
85 private float m_pfps = 0; 86 private float m_pfps = 0;
86 private int m_agentUpdates = 0; 87 private int m_agentUpdates = 0;
87 88
@@ -259,6 +260,11 @@ namespace OpenSim.Region.Framework.Scenes
259 260
260 sb[20].StatID = (uint)Stats.ScriptLinesPerSecond; 261 sb[20].StatID = (uint)Stats.ScriptLinesPerSecond;
261 sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor; 262 sb[20].StatValue = m_scriptLinesPerSecond / statsUpdateFactor;
263
264 for (int i = 0; i < 21; i++)
265 {
266 lastReportedSimStats[i] = sb[i].StatValue;
267 }
262 268
263 SimStats simStats 269 SimStats simStats
264 = new SimStats( 270 = new SimStats(
@@ -438,6 +444,11 @@ namespace OpenSim.Region.Framework.Scenes
438 { 444 {
439 return lastReportedSimFPS; 445 return lastReportedSimFPS;
440 } 446 }
447
448 public float[] getLastReportedSimStats()
449 {
450 return lastReportedSimStats;
451 }
441 452
442 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) 453 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
443 { 454 {