aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region')
-rw-r--r--OpenSim/Region/Physics/OdePlugin/OdeScene.cs26
1 files changed, 22 insertions, 4 deletions
diff --git a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
index 32dac22..d4c0b85 100644
--- a/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
+++ b/OpenSim/Region/Physics/OdePlugin/OdeScene.cs
@@ -148,6 +148,16 @@ namespace OpenSim.Region.Physics.OdePlugin
148 public const string ODENativeCollisionFrameMsStatName = "ODENativeCollisionFrameMS"; 148 public const string ODENativeCollisionFrameMsStatName = "ODENativeCollisionFrameMS";
149 149
150 /// <summary> 150 /// <summary>
151 /// Stat name for recording the number of milliseconds that ODE spends in native space collision code.
152 /// </summary>
153 public const string ODENativeSpaceCollisionFrameMsStatName = "ODENativeSpaceCollisionFrameMS";
154
155 /// <summary>
156 /// Stat name for recording the number of milliseconds that ODE spends in native geom collision code.
157 /// </summary>
158 public const string ODENativeGeomCollisionFrameMsStatName = "ODENativeGeomCollisionFrameMS";
159
160 /// <summary>
151 /// Stat name for the number of avatar collisions with another entity. 161 /// Stat name for the number of avatar collisions with another entity.
152 /// </summary> 162 /// </summary>
153 public const string ODEAvatarContactsStatsName = "ODEAvatarContacts"; 163 public const string ODEAvatarContactsStatsName = "ODEAvatarContacts";
@@ -843,7 +853,7 @@ namespace OpenSim.Region.Physics.OdePlugin
843 // We do this outside the lock so that any waiting threads aren't held up, though the effect is probably 853 // We do this outside the lock so that any waiting threads aren't held up, though the effect is probably
844 // negligable 854 // negligable
845 if (CollectStats) 855 if (CollectStats)
846 m_stats[ODENativeCollisionFrameMsStatName] 856 m_stats[ODENativeGeomCollisionFrameMsStatName]
847 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder); 857 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder);
848 858
849 return count; 859 return count;
@@ -867,7 +877,7 @@ namespace OpenSim.Region.Physics.OdePlugin
867 877
868 if (CollectStats && m_inCollisionTiming) 878 if (CollectStats && m_inCollisionTiming)
869 { 879 {
870 m_stats[ODENativeCollisionFrameMsStatName] 880 m_stats[ODENativeSpaceCollisionFrameMsStatName]
871 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder); 881 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder);
872 m_inCollisionTiming = false; 882 m_inCollisionTiming = false;
873 } 883 }
@@ -883,7 +893,7 @@ namespace OpenSim.Region.Physics.OdePlugin
883 { 893 {
884 if (CollectStats && m_inCollisionTiming) 894 if (CollectStats && m_inCollisionTiming)
885 { 895 {
886 m_stats[ODENativeCollisionFrameMsStatName] 896 m_stats[ODENativeSpaceCollisionFrameMsStatName]
887 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder); 897 += Util.EnvironmentTickCountSubtract(m_nativeCollisionTickRecorder);
888 m_inCollisionTiming = false; 898 m_inCollisionTiming = false;
889 } 899 }
@@ -4079,6 +4089,10 @@ namespace OpenSim.Region.Physics.OdePlugin
4079 lock (OdeLock) 4089 lock (OdeLock)
4080 { 4090 {
4081 returnStats = new Dictionary<string, float>(m_stats); 4091 returnStats = new Dictionary<string, float>(m_stats);
4092
4093 returnStats[ODENativeCollisionFrameMsStatName]
4094 = returnStats[ODENativeSpaceCollisionFrameMsStatName]
4095 + returnStats[ODENativeGeomCollisionFrameMsStatName];
4082 4096
4083 InitializeExtraStats(); 4097 InitializeExtraStats();
4084 } 4098 }
@@ -4088,7 +4102,11 @@ namespace OpenSim.Region.Physics.OdePlugin
4088 4102
4089 private void InitializeExtraStats() 4103 private void InitializeExtraStats()
4090 { 4104 {
4091 m_stats[ODENativeCollisionFrameMsStatName] = 0; 4105 // No need to zero since this is calculated by addition
4106 // m_stats[ODENativeCollisionFrameMsStatName] = 0;
4107
4108 m_stats[ODENativeSpaceCollisionFrameMsStatName] = 0;
4109 m_stats[ODENativeGeomCollisionFrameMsStatName] = 0;
4092 m_stats[ODEAvatarContactsStatsName] = 0; 4110 m_stats[ODEAvatarContactsStatsName] = 0;
4093 m_stats[ODEPrimContactsStatName] = 0; 4111 m_stats[ODEPrimContactsStatName] = 0;
4094 } 4112 }