diff options
author | Justin Clark-Casey (justincc) | 2011-10-10 22:23:42 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2011-10-10 22:23:42 +0100 |
commit | 19096bd391ac88bbccda00e4660a061020118bb9 (patch) | |
tree | e2a15a9a1b1070ed0b20fafad81d125c372bbe87 /OpenSim/Region | |
parent | Provide a way to turn the MonitorModule on and off (diff) | |
download | opensim-SC-19096bd391ac88bbccda00e4660a061020118bb9.zip opensim-SC-19096bd391ac88bbccda00e4660a061020118bb9.tar.gz opensim-SC-19096bd391ac88bbccda00e4660a061020118bb9.tar.bz2 opensim-SC-19096bd391ac88bbccda00e4660a061020118bb9.tar.xz |
Convert getLastReportedSimFPS() and getLastReportedSimStats() into more idiomatic LastReportedSimFPS and LastReportedSimStats on SimStatsReporter
Diffstat (limited to '')
3 files changed, 15 insertions, 15 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index ad64b55..b9d38d0 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -78,6 +78,19 @@ namespace OpenSim.Region.Framework.Scenes | |||
78 | UnAckedBytes = 24, | 78 | UnAckedBytes = 24, |
79 | } | 79 | } |
80 | 80 | ||
81 | /// <summary> | ||
82 | /// This is for llGetRegionFPS | ||
83 | /// </summary> | ||
84 | public float LastReportedSimFPS | ||
85 | { | ||
86 | get { return lastReportedSimFPS; } | ||
87 | } | ||
88 | |||
89 | public float[] LastReportedSimStats | ||
90 | { | ||
91 | get { return lastReportedSimStats; } | ||
92 | } | ||
93 | |||
81 | // Sending a stats update every 3 seconds- | 94 | // Sending a stats update every 3 seconds- |
82 | private int statsUpdatesEveryMS = 3000; | 95 | private int statsUpdatesEveryMS = 3000; |
83 | private float statsUpdateFactor = 0; | 96 | private float statsUpdateFactor = 0; |
@@ -437,19 +450,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
437 | m_activeScripts = count; | 450 | m_activeScripts = count; |
438 | } | 451 | } |
439 | 452 | ||
440 | /// <summary> | ||
441 | /// This is for llGetRegionFPS | ||
442 | /// </summary> | ||
443 | public float getLastReportedSimFPS() | ||
444 | { | ||
445 | return lastReportedSimFPS; | ||
446 | } | ||
447 | |||
448 | public float[] getLastReportedSimStats() | ||
449 | { | ||
450 | return lastReportedSimStats; | ||
451 | } | ||
452 | |||
453 | public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) | 453 | public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) |
454 | { | 454 | { |
455 | AddInPackets(inPackets); | 455 | AddInPackets(inPackets); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs index eabdce1..0820d01 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/LSL_Api.cs | |||
@@ -5925,7 +5925,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
5925 | public LSL_Float llGetRegionFPS() | 5925 | public LSL_Float llGetRegionFPS() |
5926 | { | 5926 | { |
5927 | m_host.AddScriptLPS(1); | 5927 | m_host.AddScriptLPS(1); |
5928 | return World.StatsReporter.getLastReportedSimFPS(); | 5928 | return World.StatsReporter.LastReportedSimFPS; |
5929 | } | 5929 | } |
5930 | 5930 | ||
5931 | 5931 | ||
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 6c3da20..2a7077b 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -2462,7 +2462,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
2462 | CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); | 2462 | CheckThreatLevel(ThreatLevel.Moderate, "osGetRegionStats"); |
2463 | m_host.AddScriptLPS(1); | 2463 | m_host.AddScriptLPS(1); |
2464 | LSL_List ret = new LSL_List(); | 2464 | LSL_List ret = new LSL_List(); |
2465 | float[] stats = World.StatsReporter.getLastReportedSimStats(); | 2465 | float[] stats = World.StatsReporter.LastReportedSimStats; |
2466 | 2466 | ||
2467 | for (int i = 0; i < 21; i++) | 2467 | for (int i = 0; i < 21; i++) |
2468 | { | 2468 | { |