diff options
author | Justin Clark-Casey (justincc) | 2012-06-01 04:23:36 +0100 |
---|---|---|
committer | Justin Clark-Casey (justincc) | 2012-06-01 04:23:36 +0100 |
commit | 6375db1533e6c625d7b6394542f74141092ff780 (patch) | |
tree | 1727a46467ff8fdc709ef69e58aa1b1378893b62 | |
parent | If OdeScene.Near() returns no collision contacts, then exit as early as possi... (diff) | |
download | opensim-SC-6375db1533e6c625d7b6394542f74141092ff780.zip opensim-SC-6375db1533e6c625d7b6394542f74141092ff780.tar.gz opensim-SC-6375db1533e6c625d7b6394542f74141092ff780.tar.bz2 opensim-SC-6375db1533e6c625d7b6394542f74141092ff780.tar.xz |
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
-rw-r--r-- | OpenSim/Region/Physics/OdePlugin/OdeScene.cs | 21 |
1 files changed, 21 insertions, 0 deletions
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 | |||
143 | private Dictionary<string, float> m_stats = new Dictionary<string, float>(); | 143 | private Dictionary<string, float> m_stats = new Dictionary<string, float>(); |
144 | 144 | ||
145 | /// <summary> | 145 | /// <summary> |
146 | /// Stat name for total number of avatars in this ODE scene. | ||
147 | /// </summary> | ||
148 | public const string ODETotalAvatarsStatName = "ODETotalAvatars"; | ||
149 | |||
150 | /// <summary> | ||
151 | /// Stat name for total number of prims in this ODE scene. | ||
152 | /// </summary> | ||
153 | public const string ODETotalPrimsStatName = "ODETotalPrims"; | ||
154 | |||
155 | /// <summary> | ||
156 | /// Stat name for total number of prims with active physics in this ODE scene. | ||
157 | /// </summary> | ||
158 | public const string ODEActivePrimsStatName = "ODEActivePrims"; | ||
159 | |||
160 | /// <summary> | ||
146 | /// Stat name for the total time spent in ODE frame processing. | 161 | /// Stat name for the total time spent in ODE frame processing. |
147 | /// </summary> | 162 | /// </summary> |
148 | /// <remarks> | 163 | /// <remarks> |
@@ -4220,6 +4235,12 @@ namespace OpenSim.Region.Physics.OdePlugin | |||
4220 | { | 4235 | { |
4221 | returnStats = new Dictionary<string, float>(m_stats); | 4236 | returnStats = new Dictionary<string, float>(m_stats); |
4222 | 4237 | ||
4238 | // FIXME: This is a SUPER DUMB HACK until we can establish stats that aren't subject to a division by | ||
4239 | // 3 from the SimStatsReporter. | ||
4240 | returnStats[ODETotalAvatarsStatName] = _characters.Count * 3; | ||
4241 | returnStats[ODETotalPrimsStatName] = _prims.Count * 3; | ||
4242 | returnStats[ODEActivePrimsStatName] = _activeprims.Count * 3; | ||
4243 | |||
4223 | InitializeExtraStats(); | 4244 | InitializeExtraStats(); |
4224 | } | 4245 | } |
4225 | 4246 | ||