aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2011-10-13 21:55:51 +0100
committerJustin Clark-Casey (justincc)2011-10-13 21:55:51 +0100
commitceb326284e49f0817fa0f848136ff60e6f66568f (patch)
tree40e460c38f223c8a051292acebda69e68833b961 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
parentMore method doc and formatting changes. Makes DestroyOdeStructures() private (diff)
downloadopensim-SC_OLD-ceb326284e49f0817fa0f848136ff60e6f66568f.zip
opensim-SC_OLD-ceb326284e49f0817fa0f848136ff60e6f66568f.tar.gz
opensim-SC_OLD-ceb326284e49f0817fa0f848136ff60e6f66568f.tar.bz2
opensim-SC_OLD-ceb326284e49f0817fa0f848136ff60e6f66568f.tar.xz
Move fps stat adjustment factor into field rather than hard-coded.
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs13
1 files changed, 12 insertions, 1 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 6efbaa1..8d62b16 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -105,6 +105,17 @@ namespace OpenSim.Region.Framework.Scenes
105 private float statsUpdateFactor = 0; 105 private float statsUpdateFactor = 0;
106 private float m_timeDilation = 0; 106 private float m_timeDilation = 0;
107 private int m_fps = 0; 107 private int m_fps = 0;
108
109 /// <summary>
110 /// Parameter to adjust reported scene fps
111 /// </summary>
112 /// <remarks>
113 /// Our scene loop runs slower than other server implementations, apparantly because we work somewhat differently.
114 /// However, we will still report an FPS that's closer to what people are used to seeing. A lower FPS might
115 /// affect clients and monitoring scripts/software.
116 /// </remarks>
117 private float m_fpsCorrectionFactor = 5;
118
108 // saved last reported value so there is something available for llGetRegionFPS 119 // saved last reported value so there is something available for llGetRegionFPS
109 private float lastReportedSimFPS = 0; 120 private float lastReportedSimFPS = 0;
110 private float[] lastReportedSimStats = new float[21]; 121 private float[] lastReportedSimStats = new float[21];
@@ -201,7 +212,7 @@ namespace OpenSim.Region.Framework.Scenes
201 212
202 // We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently 213 // We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently
203 // locked at a maximum of 11. Maybe at some point this can change so that we're not lying. 214 // locked at a maximum of 11. Maybe at some point this can change so that we're not lying.
204 int reportedFPS = m_fps * 5; 215 int reportedFPS = (int)(m_fps * m_fpsCorrectionFactor);
205 216
206 // save the reported value so there is something available for llGetRegionFPS 217 // save the reported value so there is something available for llGetRegionFPS
207 lastReportedSimFPS = reportedFPS / statsUpdateFactor; 218 lastReportedSimFPS = reportedFPS / statsUpdateFactor;