aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
authorTeravus Ovares2009-01-03 03:30:03 +0000
committerTeravus Ovares2009-01-03 03:30:03 +0000
commite9cef70f892bfbf4aad0e4471a958367766d849a (patch)
tree397e078977b430526a2f04041e0dfb9a5fb99156 /OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
parentSplit agent updates into two messages: full update and position+camera update... (diff)
downloadopensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.zip
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.gz
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.bz2
opensim-SC_OLD-e9cef70f892bfbf4aad0e4471a958367766d849a.tar.xz
* Updates the sim stats module. Cleans out some of the rot.
* Adds a prototype web stats module which is disabled by default. It's functional with one report right now, however, the database structure may change, so I don't recommend enabling this to keep actual stats right now. I'll let you know when it's safe. * Adds Prototype for ajaxy web content * removed a warning or two.
Diffstat (limited to 'OpenSim/Region/Environment/Scenes/SimStatsReporter.cs')
-rw-r--r--OpenSim/Region/Environment/Scenes/SimStatsReporter.cs13
1 files changed, 10 insertions, 3 deletions
diff --git a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
index c614f78..e2afa5a 100644
--- a/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Environment/Scenes/SimStatsReporter.cs
@@ -26,6 +26,7 @@
26 */ 26 */
27 27
28using System; 28using System;
29//using System.Collections.Generic;
29using System.Timers; 30using System.Timers;
30using OpenMetaverse.Packets; 31using OpenMetaverse.Packets;
31using OpenSim.Framework; 32using OpenSim.Framework;
@@ -189,7 +190,7 @@ namespace OpenSim.Region.Environment.Scenes
189 } 190 }
190 191
191 sb[0].StatID = (uint) Stats.TimeDilation; 192 sb[0].StatID = (uint) Stats.TimeDilation;
192 sb[0].StatValue = m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor)); 193 sb[0].StatValue = (Single.IsNaN(m_timeDilation)) ? 0.1f : m_timeDilation ; //((((m_timeDilation + (0.10f * statsUpdateFactor)) /10) / statsUpdateFactor));
193 194
194 sb[1].StatID = (uint) Stats.SimFPS; 195 sb[1].StatID = (uint) Stats.SimFPS;
195 sb[1].StatValue = simfps/statsUpdateFactor; 196 sb[1].StatValue = simfps/statsUpdateFactor;
@@ -253,7 +254,7 @@ namespace OpenSim.Region.Environment.Scenes
253 254
254 SimStats simStats 255 SimStats simStats
255 = new SimStats( 256 = new SimStats(
256 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb); 257 ReportingRegion.RegionLocX, ReportingRegion.RegionLocY, regionFlags, (uint)objectCapacity, rb, sb, m_scene.RegionInfo.originRegionID);
257 258
258 handlerSendStatResult = OnSendStatsResult; 259 handlerSendStatResult = OnSendStatsResult;
259 if (handlerSendStatResult != null) 260 if (handlerSendStatResult != null)
@@ -309,7 +310,11 @@ namespace OpenSim.Region.Environment.Scenes
309 310
310 public void SetChildAgents(int childAgents) 311 public void SetChildAgents(int childAgents)
311 { 312 {
312 m_childAgents = childAgents; 313 m_childAgents = (childAgents > 0) ? childAgents : 0;
314 if (childAgents < 0)
315 {
316 //List<ScenePresence> avs= m_scene.GetScenePresences();
317 }
313 } 318 }
314 319
315 public void SetObjects(int objects) 320 public void SetObjects(int objects)
@@ -350,6 +355,7 @@ namespace OpenSim.Region.Environment.Scenes
350 public void AddunAckedBytes(int numBytes) 355 public void AddunAckedBytes(int numBytes)
351 { 356 {
352 m_unAckedBytes += numBytes; 357 m_unAckedBytes += numBytes;
358 if (m_unAckedBytes < 0) m_unAckedBytes = 0;
353 } 359 }
354 360
355 public void addFrameMS(int ms) 361 public void addFrameMS(int ms)
@@ -383,6 +389,7 @@ namespace OpenSim.Region.Environment.Scenes
383 public void addPendingDownload(int count) 389 public void addPendingDownload(int count)
384 { 390 {
385 m_pendingDownloads += count; 391 m_pendingDownloads += count;
392 if (m_pendingDownloads < 0) m_pendingDownloads = 0;
386 //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads); 393 //m_log.InfoFormat("[stats]: Adding {0} to pending downloads to make {1}", count, m_pendingDownloads);
387 } 394 }
388 395