diff options
author | UbitUmarov | 2015-11-08 04:28:46 +0000 |
---|---|---|
committer | UbitUmarov | 2015-11-08 04:28:46 +0000 |
commit | 097c56330a410274410c87f4748156e08841c5cf (patch) | |
tree | 33ba1b303a9b4278b2b8988a83d3d1423c5c8d42 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |
parent | change maximum angular velocity to a value derived from heartbeat rate and N... (diff) | |
download | opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.zip opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.gz opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.bz2 opensim-SC_OLD-097c56330a410274410c87f4748156e08841c5cf.tar.xz |
rename MinFrameTime as FrameTime, since it is not a minimum but a target value; retune its value a bit so reported FPS is closer to integer value; change ode step size acording to reduce jitter in phys FPS; Make Statistics Scaling factor (fludge factor) configurable. (legacy default of 5.0 in code)
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rwxr-xr-x | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 5fe0551..bf65cab 100755 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -185,11 +185,16 @@ namespace OpenSim.Region.Framework.Scenes | |||
185 | /// Parameter to adjust reported scene fps | 185 | /// Parameter to adjust reported scene fps |
186 | /// </summary> | 186 | /// </summary> |
187 | /// <remarks> | 187 | /// <remarks> |
188 | /// Our scene loop runs slower than other server implementations, apparantly because we work somewhat differently. | 188 | /// The close we have to a frame rate as expected by viewers, users and scripts |
189 | /// However, we will still report an FPS that's closer to what people are used to seeing. A lower FPS might | 189 | /// is heartbeat rate. |
190 | /// affect clients and monitoring scripts/software. | 190 | /// heartbeat rate default value is very diferent from the expected one |
191 | /// and can be changed from region to region acording to its specific simulation needs | ||
192 | /// since this creates incompatibility with expected values, | ||
193 | /// this scale factor can be used to normalize values to a Virtual FPS. | ||
194 | /// original decision was to use a value of 55fps for all opensim | ||
195 | /// corresponding, with default heartbeat rate, to a value of 5. | ||
191 | /// </remarks> | 196 | /// </remarks> |
192 | private float m_reportedFpsCorrectionFactor = 1.0f; | 197 | private float m_statisticsFPSfactor = 5.0f; |
193 | 198 | ||
194 | // saved last reported value so there is something available for llGetRegionFPS | 199 | // saved last reported value so there is something available for llGetRegionFPS |
195 | private float lastReportedSimFPS; | 200 | private float lastReportedSimFPS; |
@@ -252,6 +257,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
252 | m_scene = scene; | 257 | m_scene = scene; |
253 | 258 | ||
254 | ReportingRegion = scene.RegionInfo; | 259 | ReportingRegion = scene.RegionInfo; |
260 | m_statisticsFPSfactor = scene.StatisticsFPSfactor; | ||
255 | 261 | ||
256 | m_objectCapacity = scene.RegionInfo.ObjectCapacity; | 262 | m_objectCapacity = scene.RegionInfo.ObjectCapacity; |
257 | m_report.AutoReset = true; | 263 | m_report.AutoReset = true; |
@@ -266,7 +272,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
266 | 272 | ||
267 | /// At the moment, we'll only report if a frame is over 120% of target, since commonly frames are a bit | 273 | /// At the moment, we'll only report if a frame is over 120% of target, since commonly frames are a bit |
268 | /// longer than ideal (which in itself is a concern). | 274 | /// longer than ideal (which in itself is a concern). |
269 | SlowFramesStatReportThreshold = (int)Math.Ceiling(m_scene.MinFrameTime * 1000 * 1.2); | 275 | SlowFramesStatReportThreshold = (int)Math.Ceiling(m_scene.FrameTime * 1000 * 1.2); |
270 | 276 | ||
271 | SlowFramesStat | 277 | SlowFramesStat |
272 | = new Stat( | 278 | = new Stat( |
@@ -351,10 +357,10 @@ namespace OpenSim.Region.Framework.Scenes | |||
351 | float updateFactor = 1.0f / m_statsUpdateFactor; | 357 | float updateFactor = 1.0f / m_statsUpdateFactor; |
352 | 358 | ||
353 | // the nominal frame time, corrected by reporting multiplier | 359 | // the nominal frame time, corrected by reporting multiplier |
354 | float TargetFrameTime = 1000.0f * m_scene.MinFrameTime / m_reportedFpsCorrectionFactor; | 360 | float TargetFrameTime = 1000.0f * m_scene.FrameTime / m_statisticsFPSfactor; |
355 | 361 | ||
356 | // acumulated fps scaled by reporting multiplier | 362 | // acumulated fps scaled by reporting multiplier |
357 | float reportedFPS = (m_fps * m_reportedFpsCorrectionFactor); | 363 | float reportedFPS = (m_fps * m_statisticsFPSfactor); |
358 | if (reportedFPS <= 0) | 364 | if (reportedFPS <= 0) |
359 | reportedFPS = 1; | 365 | reportedFPS = 1; |
360 | 366 | ||
@@ -376,7 +382,7 @@ namespace OpenSim.Region.Framework.Scenes | |||
376 | m_activePrim = m_scene.SceneGraph.GetActiveObjectsCount(); | 382 | m_activePrim = m_scene.SceneGraph.GetActiveObjectsCount(); |
377 | m_activeScripts = m_scene.SceneGraph.GetActiveScriptsCount(); | 383 | m_activeScripts = m_scene.SceneGraph.GetActiveScriptsCount(); |
378 | 384 | ||
379 | float physfps = m_pfps * updateFactor; | 385 | float physfps = m_pfps * updateFactor * m_statisticsFPSfactor; |
380 | if (physfps < 0) | 386 | if (physfps < 0) |
381 | physfps = 0; | 387 | physfps = 0; |
382 | else if(physfps > reportedFPS) | 388 | else if(physfps > reportedFPS) |