diff options
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/SimStatsReporter.cs')
-rw-r--r-- | OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs index 20919a1..756b1f4 100644 --- a/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs +++ b/OpenSim/Region/Framework/Scenes/SimStatsReporter.cs | |||
@@ -438,23 +438,26 @@ namespace OpenSim.Region.Framework.Scenes | |||
438 | } | 438 | } |
439 | 439 | ||
440 | // Extra statistics that aren't currently sent to clients | 440 | // Extra statistics that aren't currently sent to clients |
441 | lock (m_lastReportedExtraSimStats) | 441 | if (m_scene.PhysicsScene != null) |
442 | { | 442 | { |
443 | m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; | 443 | lock (m_lastReportedExtraSimStats) |
444 | |||
445 | Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); | ||
446 | |||
447 | if (physicsStats != null) | ||
448 | { | 444 | { |
449 | foreach (KeyValuePair<string, float> tuple in physicsStats) | 445 | m_lastReportedExtraSimStats[LastReportedObjectUpdateStatName] = m_objectUpdates / m_statsUpdateFactor; |
446 | |||
447 | Dictionary<string, float> physicsStats = m_scene.PhysicsScene.GetStats(); | ||
448 | |||
449 | if (physicsStats != null) | ||
450 | { | 450 | { |
451 | // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second | 451 | foreach (KeyValuePair<string, float> tuple in physicsStats) |
452 | // Need to change things so that stats source can indicate whether they are per second or | 452 | { |
453 | // per frame. | 453 | // FIXME: An extremely dirty hack to divide MS stats per frame rather than per second |
454 | if (tuple.Key.EndsWith("MS")) | 454 | // Need to change things so that stats source can indicate whether they are per second or |
455 | m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe; | 455 | // per frame. |
456 | else | 456 | if (tuple.Key.EndsWith("MS")) |
457 | m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor; | 457 | m_lastReportedExtraSimStats[tuple.Key] = tuple.Value * perframe; |
458 | else | ||
459 | m_lastReportedExtraSimStats[tuple.Key] = tuple.Value / m_statsUpdateFactor; | ||
460 | } | ||
458 | } | 461 | } |
459 | } | 462 | } |
460 | } | 463 | } |