aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs12
1 files changed, 9 insertions, 3 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 8d62b16..35cd025 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -107,6 +107,11 @@ namespace OpenSim.Region.Framework.Scenes
107 private int m_fps = 0; 107 private int m_fps = 0;
108 108
109 /// <summary> 109 /// <summary>
110 /// Our nominal fps target, as expected in fps stats when a sim is running normally.
111 /// </summary>
112 private float m_nominalReportedFps = 55;
113
114 /// <summary>
110 /// Parameter to adjust reported scene fps 115 /// Parameter to adjust reported scene fps
111 /// </summary> 116 /// </summary>
112 /// <remarks> 117 /// <remarks>
@@ -114,7 +119,7 @@ namespace OpenSim.Region.Framework.Scenes
114 /// However, we will still report an FPS that's closer to what people are used to seeing. A lower FPS might 119 /// 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. 120 /// affect clients and monitoring scripts/software.
116 /// </remarks> 121 /// </remarks>
117 private float m_fpsCorrectionFactor = 5; 122 private float m_reportedFpsCorrectionFactor = 5;
118 123
119 // saved last reported value so there is something available for llGetRegionFPS 124 // saved last reported value so there is something available for llGetRegionFPS
120 private float lastReportedSimFPS = 0; 125 private float lastReportedSimFPS = 0;
@@ -165,8 +170,9 @@ namespace OpenSim.Region.Framework.Scenes
165 170
166 public SimStatsReporter(Scene scene) 171 public SimStatsReporter(Scene scene)
167 { 172 {
168 statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000);
169 m_scene = scene; 173 m_scene = scene;
174 m_reportedFpsCorrectionFactor = scene.MinFrameTime * m_nominalReportedFps;
175 statsUpdateFactor = (float)(statsUpdatesEveryMS / 1000);
170 ReportingRegion = scene.RegionInfo; 176 ReportingRegion = scene.RegionInfo;
171 177
172 m_objectCapacity = scene.RegionInfo.ObjectCapacity; 178 m_objectCapacity = scene.RegionInfo.ObjectCapacity;
@@ -212,7 +218,7 @@ namespace OpenSim.Region.Framework.Scenes
212 218
213 // We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently 219 // We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently
214 // locked at a maximum of 11. Maybe at some point this can change so that we're not lying. 220 // locked at a maximum of 11. Maybe at some point this can change so that we're not lying.
215 int reportedFPS = (int)(m_fps * m_fpsCorrectionFactor); 221 int reportedFPS = (int)(m_fps * m_reportedFpsCorrectionFactor);
216 222
217 // save the reported value so there is something available for llGetRegionFPS 223 // save the reported value so there is something available for llGetRegionFPS
218 lastReportedSimFPS = reportedFPS / statsUpdateFactor; 224 lastReportedSimFPS = reportedFPS / statsUpdateFactor;