diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/Scene.cs | 5 | ||||
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 42 |
2 files changed, 14 insertions, 33 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs index ce386be..702e322 100644 --- a/OpenSim/Region/Framework/Scenes/Scene.cs +++ b/OpenSim/Region/Framework/Scenes/Scene.cs | |||
@@ -1462,10 +1462,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1462 | StatsReporter.AddPhysicsFPS(physicsFPS); | 1462 | StatsReporter.AddPhysicsFPS(physicsFPS); |
1463 | StatsReporter.AddTimeDilation(TimeDilation); | 1463 | StatsReporter.AddTimeDilation(TimeDilation); |
1464 | StatsReporter.AddFPS(1); | 1464 | StatsReporter.AddFPS(1); |
1465 | StatsReporter.SetRootAgents(m_sceneGraph.GetRootAgentCount()); | ||
1466 | StatsReporter.SetChildAgents(m_sceneGraph.GetChildAgentCount()); | ||
1467 | StatsReporter.SetObjects(m_sceneGraph.GetTotalObjectsCount()); | ||
1468 | StatsReporter.SetActiveObjects(m_sceneGraph.GetActiveObjectsCount()); | ||
1469 | 1465 | ||
1470 | // frameMS currently records work frame times, not total frame times (work + any required sleep to | 1466 | // frameMS currently records work frame times, not total frame times (work + any required sleep to |
1471 | // reach min frame time. | 1467 | // reach min frame time. |
@@ -1474,7 +1470,6 @@ namespace OpenSim.Region.Framework.Scenes | |||
1474 | StatsReporter.addAgentMS(agentMS); | 1470 | StatsReporter.addAgentMS(agentMS); |
1475 | StatsReporter.addPhysicsMS(physicsMS + physicsMS2); | 1471 | StatsReporter.addPhysicsMS(physicsMS + physicsMS2); |
1476 | StatsReporter.addOtherMS(otherMS); | 1472 | StatsReporter.addOtherMS(otherMS); |
1477 | StatsReporter.SetActiveScripts(m_sceneGraph.GetActiveScriptsCount()); | ||
1478 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); | 1473 | StatsReporter.addScriptLines(m_sceneGraph.GetScriptLPS()); |
1479 | 1474 | ||
1480 | if (LoginsDisabled && Frame == 20) | 1475 | if (LoginsDisabled && Frame == 20) |
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); |