aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Physics/Manager/PhysicsScene.cs
diff options
context:
space:
mode:
authorJustin Clark-Casey (justincc)2012-05-31 01:52:26 +0100
committerJustin Clark-Casey (justincc)2012-05-31 01:52:26 +0100
commit0b02a4d42e989609a4e1ba39d2aee9a7f9655613 (patch)
tree353e05997fb8478cb6b3691edc943604e5dd78ff /OpenSim/Region/Physics/Manager/PhysicsScene.cs
parentAdd console command "teleport user" to allow teleport from the region console (diff)
downloadopensim-SC_OLD-0b02a4d42e989609a4e1ba39d2aee9a7f9655613.zip
opensim-SC_OLD-0b02a4d42e989609a4e1ba39d2aee9a7f9655613.tar.gz
opensim-SC_OLD-0b02a4d42e989609a4e1ba39d2aee9a7f9655613.tar.bz2
opensim-SC_OLD-0b02a4d42e989609a4e1ba39d2aee9a7f9655613.tar.xz
Add an optional mechanism for physics modules to collect and return arbitrary stats.
If active, the physics module can return arbitrary stat counters that can be seen via the MonitoringModule (http://opensimulator.org/wiki/Monitoring_Module) This is only active in OdeScene if collect_stats = true in [ODEPhysicsSettings]. This patch allows OdeScene to collect elapsed time information for calls to the ODE native collision methods to assess what proportion of time this takes compared to total physics processing. This data is returned as ODENativeCollisionFrameMS in the monitoring module, updated every 3 seconds. The performance effect of collecting stats is probably extremely minor, dwarfed by the rest of the physics code.
Diffstat (limited to 'OpenSim/Region/Physics/Manager/PhysicsScene.cs')
-rw-r--r--OpenSim/Region/Physics/Manager/PhysicsScene.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/OpenSim/Region/Physics/Manager/PhysicsScene.cs b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
index 2a6163c..b32cd30 100644
--- a/OpenSim/Region/Physics/Manager/PhysicsScene.cs
+++ b/OpenSim/Region/Physics/Manager/PhysicsScene.cs
@@ -192,8 +192,22 @@ namespace OpenSim.Region.Physics.Manager
192 192
193 public abstract void AddPhysicsActorTaint(PhysicsActor prim); 193 public abstract void AddPhysicsActorTaint(PhysicsActor prim);
194 194
195 /// <summary>
196 /// Perform a simulation of the current physics scene over the given timestep.
197 /// </summary>
198 /// <param name="timeStep"></param>
199 /// <returns>The number of frames simulated over that period.</returns>
195 public abstract float Simulate(float timeStep); 200 public abstract float Simulate(float timeStep);
196 201
202 /// <summary>
203 /// Get statistics about this scene.
204 /// </summary>
205 /// <remarks>This facility is currently experimental and subject to change.</remarks>
206 /// <returns>
207 /// A dictionary where the key is the statistic name. If no statistics are supplied then returns null.
208 /// </returns>
209 public virtual Dictionary<string, float> GetStats() { return null; }
210
197 public abstract void GetResults(); 211 public abstract void GetResults();
198 212
199 public abstract void SetTerrain(float[] heightMap); 213 public abstract void SetTerrain(float[] heightMap);