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 cb102d0..0efe4c4 100644
--- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
+++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
@@ -222,6 +222,10 @@ namespace OpenSim.Region.Framework.Scenes
222 m_report.Close(); 222 m_report.Close();
223 } 223 }
224 224
225 /// <summary>
226 /// Sets the number of milliseconds between stat updates.
227 /// </summary>
228 /// <param name='ms'></param>
225 public void SetUpdateMS(int ms) 229 public void SetUpdateMS(int ms)
226 { 230 {
227 statsUpdatesEveryMS = ms; 231 statsUpdatesEveryMS = ms;
@@ -296,6 +300,16 @@ namespace OpenSim.Region.Framework.Scenes
296 sparetime = TotalFrameTime; 300 sparetime = TotalFrameTime;
297 sleeptime = m_sleeptimeMS * perframe; 301 sleeptime = m_sleeptimeMS * perframe;
298 } 302 }
303
304 m_rootAgents = m_scene.SceneGraph.GetRootAgentCount();
305 m_childAgents = m_scene.SceneGraph.GetChildAgentCount();
306 m_numPrim = m_scene.SceneGraph.GetTotalObjectsCount();
307 m_activePrim = m_scene.SceneGraph.GetActiveObjectsCount();
308 m_activeScripts = m_scene.SceneGraph.GetActiveScriptsCount();
309
310 // FIXME: Checking for stat sanity is a complex approach. What we really need to do is fix the code
311 // so that stat numbers are always consistent.
312 CheckStatSanity();
299 313
300 // other MS is actually simulation time 314 // other MS is actually simulation time
301 // m_otherMS = m_frameMS - m_physicsMS - m_imageMS - m_netMS - m_agentMS; 315 // m_otherMS = m_frameMS - m_physicsMS - m_imageMS - m_netMS - m_agentMS;
@@ -462,13 +476,6 @@ namespace OpenSim.Region.Framework.Scenes
462 m_timeDilation = td; 476 m_timeDilation = td;
463 } 477 }
464 478
465 public void SetRootAgents(int rootAgents)
466 {
467 m_rootAgents = rootAgents;
468 CheckStatSanity();
469
470 }
471
472 internal void CheckStatSanity() 479 internal void CheckStatSanity()
473 { 480 {
474 if (m_rootAgents < 0 || m_childAgents < 0) 481 if (m_rootAgents < 0 || m_childAgents < 0)
@@ -485,22 +492,6 @@ namespace OpenSim.Region.Framework.Scenes
485 } 492 }
486 } 493 }
487 494
488 public void SetChildAgents(int childAgents)
489 {
490 m_childAgents = childAgents;
491 CheckStatSanity();
492 }
493
494 public void SetObjects(int objects)
495 {
496 m_numPrim = objects;
497 }
498
499 public void SetActiveObjects(int objects)
500 {
501 m_activePrim = objects;
502 }
503
504 public void AddFPS(int frames) 495 public void AddFPS(int frames)
505 { 496 {
506 m_fps += frames; 497 m_fps += frames;
@@ -587,11 +578,6 @@ namespace OpenSim.Region.Framework.Scenes
587 m_scriptLinesPerSecond += count; 578 m_scriptLinesPerSecond += count;
588 } 579 }
589 580
590 public void SetActiveScripts(int count)
591 {
592 m_activeScripts = count;
593 }
594
595 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes) 581 public void AddPacketsStats(int inPackets, int outPackets, int unAckedBytes)
596 { 582 {
597 AddInPackets(inPackets); 583 AddInPackets(inPackets);