aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
authorUbitUmarov2012-04-24 05:42:47 +0100
committerUbitUmarov2012-04-24 05:42:47 +0100
commit1848ceac955e3b41130edbd0cf33bdcc6186d9f8 (patch)
tree3ac7d1a909421dee72d6c78889fa4fadd52a20f2 /OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
parent display heatbeat sleep time in stats. This may not be good for general use, ... (diff)
downloadopensim-SC_OLD-1848ceac955e3b41130edbd0cf33bdcc6186d9f8.zip
opensim-SC_OLD-1848ceac955e3b41130edbd0cf33bdcc6186d9f8.tar.gz
opensim-SC_OLD-1848ceac955e3b41130edbd0cf33bdcc6186d9f8.tar.bz2
opensim-SC_OLD-1848ceac955e3b41130edbd0cf33bdcc6186d9f8.tar.xz
"save the catgirls"
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs18
1 files changed, 4 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index e9589b8..94f1b15 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -253,24 +253,13 @@ namespace OpenSim.Region.Framework.Scenes
253 physfps = 0; 253 physfps = 0;
254 254
255#endregion 255#endregion
256
257 //Our time dilation is 0.91 when we're running a full speed,
258 // therefore to make sure we get an appropriate range,
259 // we have to factor in our error. (0.10f * statsUpdateFactor)
260 // multiplies the fix for the error times the amount of times it'll occur a second
261 // / 10 divides the value by the number of times the sim heartbeat runs (10fps)
262 // Then we divide the whole amount by the amount of seconds pass in between stats updates.
263
264 // 'statsUpdateFactor' is how often stats packets are sent in seconds. Used below to change
265 // values to X-per-second values.
266
267 float factor = 1 / statsUpdateFactor; 256 float factor = 1 / statsUpdateFactor;
268 if (reportedFPS <= 0) 257 if (reportedFPS <= 0)
269 reportedFPS = 1; 258 reportedFPS = 1;
270 259
271 float perframe = 1.0f / (float)reportedFPS; 260 float perframe = 1.0f / (float)reportedFPS;
272 261
273 float TotalFrameTime = 1000.0f * statsUpdateFactor * perframe; 262 float TotalFrameTime = m_frameMS * perframe;
274 263
275 float targetframetime = 1100.0f / (float)m_nominalReportedFps; 264 float targetframetime = 1100.0f / (float)m_nominalReportedFps;
276 265
@@ -279,7 +268,8 @@ namespace OpenSim.Region.Framework.Scenes
279 sparetime = 0; 268 sparetime = 0;
280 else 269 else
281 { 270 {
282 sparetime = TotalFrameTime - m_frameMS * perframe; 271 sparetime = m_frameMS - m_physicsMS - m_agentMS;
272 sparetime *= perframe;
283 if (sparetime < 0) 273 if (sparetime < 0)
284 sparetime = 0; 274 sparetime = 0;
285 else if (sparetime > TotalFrameTime) 275 else if (sparetime > TotalFrameTime)
@@ -290,7 +280,7 @@ namespace OpenSim.Region.Framework.Scenes
290 // m_otherMS = m_frameMS - m_physicsMS - m_imageMS - m_netMS - m_agentMS; 280 // m_otherMS = m_frameMS - m_physicsMS - m_imageMS - m_netMS - m_agentMS;
291 // m_imageMS m_netMS are not included in m_frameMS 281 // m_imageMS m_netMS are not included in m_frameMS
292 282
293 m_otherMS = m_frameMS - m_physicsMS - m_agentMS; 283 m_otherMS = m_frameMS - m_physicsMS - m_agentMS - m_sleeptimeMS;
294 if (m_otherMS < 0) 284 if (m_otherMS < 0)
295 m_otherMS = 0; 285 m_otherMS = 0;
296 286