From 6375db1533e6c625d7b6394542f74141092ff780 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 1 Jun 2012 04:23:36 +0100 Subject: Add optional total avatars, total prims and active prims stats to ODE plugin. These will act as a sanity check with the main scene stats, to show that physics scene entities are being managed properly. Total prims will not match scene total prims since physics total does not include phantom prims --- OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'OpenSim') diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs index c26c9c5..c6ecc68 100644 --- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs +++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs @@ -143,6 +143,21 @@ namespace OpenSim.Region.Physics.OdePlugin private Dictionary m_stats = new Dictionary(); /// + /// Stat name for total number of avatars in this ODE scene. + /// + public const string ODETotalAvatarsStatName = "ODETotalAvatars"; + + /// + /// Stat name for total number of prims in this ODE scene. + /// + public const string ODETotalPrimsStatName = "ODETotalPrims"; + + /// + /// Stat name for total number of prims with active physics in this ODE scene. + /// + public const string ODEActivePrimsStatName = "ODEActivePrims"; + + /// /// Stat name for the total time spent in ODE frame processing. /// /// @@ -4220,6 +4235,12 @@ namespace OpenSim.Region.Physics.OdePlugin { returnStats = new Dictionary(m_stats); + // FIXME: This is a SUPER DUMB HACK until we can establish stats that aren't subject to a division by + // 3 from the SimStatsReporter. + returnStats[ODETotalAvatarsStatName] = _characters.Count * 3; + returnStats[ODETotalPrimsStatName] = _prims.Count * 3; + returnStats[ODEActivePrimsStatName] = _activeprims.Count * 3; + InitializeExtraStats(); } -- cgit v1.1