diff options
author | Jeff Lee | 2009-11-22 18:10:46 -0500 |
---|---|---|
committer | Melanie | 2009-11-26 17:43:00 +0000 |
commit | d39c300d11109553b75ca761d26dda278c0ad7dd (patch) | |
tree | 5e45b10aa3389eaddc4e2b5b39ba872af3087fc5 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |
parent | Fix a small bug. Trusted script crossings now work again (diff) | |
download | opensim-SC-d39c300d11109553b75ca761d26dda278c0ad7dd.zip opensim-SC-d39c300d11109553b75ca761d26dda278c0ad7dd.tar.gz opensim-SC-d39c300d11109553b75ca761d26dda278c0ad7dd.tar.bz2 opensim-SC-d39c300d11109553b75ca761d26dda278c0ad7dd.tar.xz |
Added osGetRegionStats() function, to return a number of sim statistics
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 11 |
1 files changed, 11 insertions, 0 deletions
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 | { |