aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs42
1 files changed, 14 insertions, 28 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
index 08d8d7c..87af311 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -207,6 +207,10 @@ namespace OpenSim.Region.Framework.Scenes
207 m_report.Close(); 207 m_report.Close();
208 } 208 }
209 209
210 /// <summary>
211 /// Sets the number of milliseconds between stat updates.
212 /// </summary>
213 /// <param name='ms'></param>
210 public void SetUpdateMS(int ms) 214 public void SetUpdateMS(int ms)
211 { 215 {
212 statsUpdatesEveryMS = ms; 216 statsUpdatesEveryMS = ms;
@@ -254,6 +258,16 @@ namespace OpenSim.Region.Framework.Scenes
254 physfps = 0; 258 physfps = 0;
255 259
256#endregion 260#endregion
261
262 m_rootAgents = m_scene.SceneGraph.GetRootAgentCount();
263 m_childAgents = m_scene.SceneGraph.GetChildAgentCount();
264 m_numPrim = m_scene.SceneGraph.GetTotalObjectsCount();
265 m_activePrim = m_scene.SceneGraph.GetActiveObjectsCount();
266 m_activeScripts = m_scene.SceneGraph.GetActiveScriptsCount();
267
268 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
269 // so that stat numbers are always consistent.
270 CheckStatSanity();
257 271
258 //Our time dilation is 0.91 when we're running a full speed, 272 //Our time dilation is 0.91 when we're running a full speed,
259 // therefore to make sure we get an appropriate range, 273 // therefore to make sure we get an appropriate range,
@@ -408,13 +422,6 @@ namespace OpenSim.Region.Framework.Scenes
408 m_timeDilation = td; 422 m_timeDilation = td;
409 } 423 }
410 424
411 public void SetRootAgents(int rootAgents)
412 {
413 m_rootAgents = rootAgents;
414 CheckStatSanity();
415
416 }
417
418 internal void CheckStatSanity() 425 internal void CheckStatSanity()
419 { 426 {
420 if (m_rootAgents < 0 || m_childAgents < 0) 427 if (m_rootAgents < 0 || m_childAgents < 0)
@@ -431,22 +438,6 @@ namespace OpenSim.Region.Framework.Scenes
431 } 438 }
432 } 439 }
433 440
434 public void SetChildAgents(int childAgents)
435 {
436 m_childAgents = childAgents;
437 CheckStatSanity();
438 }
439
440 public void SetObjects(int objects)
441 {
442 m_numPrim = objects;
443 }
444
445 public void SetActiveObjects(int objects)
446 {
447 m_activePrim = objects;
448 }
449
450 public void AddFPS(int frames) 441 public void AddFPS(int frames)
451 { 442 {
452 m_fps += frames; 443 m_fps += frames;
@@ -528,11 +519,6 @@ namespace OpenSim.Region.Framework.Scenes
528 m_scriptLinesPerSecond += count; 519 m_scriptLinesPerSecond += count;
529 } 520 }
530 521
531 public void SetActiveScripts(int count)
532 {
533 m_activeScripts = count;
534 }
535
536 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) 522 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
537 { 523 {
538 AddInPackets(inPackets); 524 AddInPackets(inPackets);