aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes
diff options
context:
space:
mode:
authorMelanie2012-06-02 01:40:42 +0100
committerMelanie2012-06-02 01:40:42 +0100
commit522f36345d4e07d2ec0ff86f2b6e0b56c07607e0 (patch)
tree571c5e5197dd5246a86b5c074ef9692c498565a7 /OpenSim/Region/Framework/Scenes
parentMerge branch 'avination' into careminster (diff)
parentInstead of updating sim stats root agent, child, objects and scripts accounts... (diff)
downloadopensim-SC-522f36345d4e07d2ec0ff86f2b6e0b56c07607e0.zip
opensim-SC-522f36345d4e07d2ec0ff86f2b6e0b56c07607e0.tar.gz
opensim-SC-522f36345d4e07d2ec0ff86f2b6e0b56c07607e0.tar.bz2
opensim-SC-522f36345d4e07d2ec0ff86f2b6e0b56c07607e0.tar.xz
Merge branch 'master' into careminster
Conflicts: OpenSim/Region/Framework/Scenes/SimStatsReporter.cs
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs5
-rw-r--r--OpenSim/Region/Framework/Scenes/SimStatsReporter.cs42
2 files changed, 14 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 32c7262..b79892d 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1512,10 +1512,6 @@ namespace OpenSim.Region.Framework.Scenes
1512 StatsReporter.AddPhysicsFPS(physicsFPS); 1512 StatsReporter.AddPhysicsFPS(physicsFPS);
1513 StatsReporter.AddTimeDilation(TimeDilation); 1513 StatsReporter.AddTimeDilation(TimeDilation);
1514 StatsReporter.AddFPS(1); 1514 StatsReporter.AddFPS(1);
1515 StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount());
1516 StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount());
1517 StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount());
1518 StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount());
1519 1515
1520 // frameMS currently records work frame times, not total frame times (work + any required sleep to 1516 // frameMS currently records work frame times, not total frame times (work + any required sleep to
1521 // reach min frame time. 1517 // reach min frame time.
@@ -1524,7 +1520,6 @@ namespace OpenSim.Region.Framework.Scenes
1524 StatsReporter.addAgentMS(agentMS); 1520 StatsReporter.addAgentMS(agentMS);
1525 StatsReporter.addPhysicsMS(physicsMS + physicsMS2); 1521 StatsReporter.addPhysicsMS(physicsMS + physicsMS2);
1526 StatsReporter.addOtherMS(otherMS); 1522 StatsReporter.addOtherMS(otherMS);
1527 StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount());
1528 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); 1523 StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS());
1529 1524
1530 if (LoginsDisabled && Frame == 20) 1525 if (LoginsDisabled && Frame == 20)
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);