diff options
author | Melanie | 2011-10-25 01:43:12 +0100 |
---|---|---|
committer | Melanie | 2011-10-25 01:43:12 +0100 |
commit | 53caaa8236b71ddfc7f29e943ed9e65d82107179 (patch) | |
tree | f7182a09c0d6d8ea676cc33eb47397f40d778ddd /OpenSim/Region | |
parent | Merge commit '20da04fd0c909a00c0cdc2585f242e95c868801a' into bigmerge (diff) | |
parent | Move fps stat adjustment factor into field rather than hard-coded. (diff) | |
download | opensim-SC_OLD-53caaa8236b71ddfc7f29e943ed9e65d82107179.zip opensim-SC_OLD-53caaa8236b71ddfc7f29e943ed9e65d82107179.tar.gz opensim-SC_OLD-53caaa8236b71ddfc7f29e943ed9e65d82107179.tar.bz2 opensim-SC_OLD-53caaa8236b71ddfc7f29e943ed9e65d82107179.tar.xz |
Merge commit 'ceb326284e49f0817fa0f848136ff60e6f66568f' into bigmerge
Diffstat (limited to 'OpenSim/Region')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 13 |
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; |