From ceb326284e49f0817fa0f848136ff60e6f66568f Mon Sep 17 00:00:00 2001
From: Justin Clark-Casey (justincc)
Date: Thu, 13 Oct 2011 21:55:51 +0100
Subject: Move fps stat adjustment factor into field rather than hard-coded.
---
OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
(limited to 'OpenSim/Region/Framework/Scenes')
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
private float statsUpdateFactor = 0;
private float m_timeDilation = 0;
private int m_fps = 0;
+
+ ///
+ /// Parameter to adjust reported scene fps
+ ///
+ ///
+ /// Our scene loop runs slower than other server implementations, apparantly because we work somewhat differently.
+ /// However, we will still report an FPS that's closer to what people are used to seeing. A lower FPS might
+ /// affect clients and monitoring scripts/software.
+ ///
+ private float m_fpsCorrectionFactor = 5;
+
// saved last reported value so there is something available for llGetRegionFPS
private float lastReportedSimFPS = 0;
private float[] lastReportedSimStats = new float[21];
@@ -201,7 +212,7 @@ namespace OpenSim.Region.Framework.Scenes
// We're going to lie about the FPS because we've been lying since 2008. The actual FPS is currently
// locked at a maximum of 11. Maybe at some point this can change so that we're not lying.
- int reportedFPS = m_fps * 5;
+ int reportedFPS = (int)(m_fps * m_fpsCorrectionFactor);
// save the reported value so there is something available for llGetRegionFPS
lastReportedSimFPS = reportedFPS / statsUpdateFactor;
--
cgit v1.1