aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Physics')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index f1fa38e..0b9ad61 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -171,6 +171,11 @@ namespace OpenSim.Region.Physics.OdePlugin
171 public const string ODENativeGeomCollisionFrameMsStatName = "ODENativeGeomCollisionFrameMS"; 171 public const string ODENativeGeomCollisionFrameMsStatName = "ODENativeGeomCollisionFrameMS";
172 172
173 /// <summary> 173 /// <summary>
174 /// Stat name for time spent notifying listeners of collisions
175 /// </summary>
176 public const string ODECollisionNotificationFrameMsStatName = "ODECollisionNotificationFrameMS";
177
178 /// <summary>
174 /// Stat name for the milliseconds spent updating avatar position and velocity 179 /// Stat name for the milliseconds spent updating avatar position and velocity
175 /// </summary> 180 /// </summary>
176 public const string ODEAvatarUpdateFrameMsStatName = "ODEAvatarUpdateFrameMS"; 181 public const string ODEAvatarUpdateFrameMsStatName = "ODEAvatarUpdateFrameMS";
@@ -2998,6 +3003,9 @@ namespace OpenSim.Region.Physics.OdePlugin
2998 3003
2999 collision_optimized(); 3004 collision_optimized();
3000 3005
3006 if (CollectStats)
3007 tempTick = Util.EnvironmentTickCount();
3008
3001 foreach (PhysicsActor obj in _collisionEventPrim.Values) 3009 foreach (PhysicsActor obj in _collisionEventPrim.Values)
3002 { 3010 {
3003// m_log.DebugFormat("[PHYSICS]: Assessing {0} {1} for collision events", obj.SOPName, obj.LocalID); 3011// m_log.DebugFormat("[PHYSICS]: Assessing {0} {1} for collision events", obj.SOPName, obj.LocalID);
@@ -3024,7 +3032,12 @@ namespace OpenSim.Region.Physics.OdePlugin
3024 m_global_contactcount = 0; 3032 m_global_contactcount = 0;
3025 3033
3026 if (CollectStats) 3034 if (CollectStats)
3035 {
3036 m_stats[ODECollisionNotificationFrameMsStatName]
3037 += Util.EnvironmentTickCountSubtract(tempTick);
3038
3027 tempTick = Util.EnvironmentTickCount(); 3039 tempTick = Util.EnvironmentTickCount();
3040 }
3028 3041
3029 d.WorldQuickStep(world, ODE_STEPSIZE); 3042 d.WorldQuickStep(world, ODE_STEPSIZE);
3030 3043
@@ -4155,6 +4168,7 @@ namespace OpenSim.Region.Physics.OdePlugin
4155 m_stats[ODENativeStepFrameMsStatName] = 0; 4168 m_stats[ODENativeStepFrameMsStatName] = 0;
4156 m_stats[ODENativeSpaceCollisionFrameMsStatName] = 0; 4169 m_stats[ODENativeSpaceCollisionFrameMsStatName] = 0;
4157 m_stats[ODENativeGeomCollisionFrameMsStatName] = 0; 4170 m_stats[ODENativeGeomCollisionFrameMsStatName] = 0;
4171 m_stats[ODECollisionNotificationFrameMsStatName] = 0;
4158 m_stats[ODEAvatarContactsStatsName] = 0; 4172 m_stats[ODEAvatarContactsStatsName] = 0;
4159 m_stats[ODEPrimContactsStatName] = 0; 4173 m_stats[ODEPrimContactsStatName] = 0;
4160 m_stats[ODEAvatarUpdateFrameMsStatName] = 0; 4174 m_stats[ODEAvatarUpdateFrameMsStatName] = 0;