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.
This commit is contained in:
Justin Clark-Casey (justincc)
2012-05-31 01:52:26 +01:00
parent bf0b8170f7
commit 0b02a4d42e
6 changed files with 271 additions and 71 deletions

View File

@@ -675,6 +675,25 @@
[ODEPhysicsSettings]
; ##
; ## Physics stats settings
;
; If collect_stats is enabled, then extra stat information is collected which is accessible via the MonitorModule
; (see http://opensimulator.org/wiki/Monitoring_Module for more details).
collect_stats = false
; ##
; ## Physics logging settings - logfiles are saved to *.DIF files
; ##
; default is false
;physics_logging = true
;; every n simulation iterations, the physics snapshot file is updated
;physics_logging_interval = 50
;; append to existing physics logfile, or overwrite existing logfiles?
;physics_logging_append_existing_logfile = true
;##
;## World Settings
;##
@@ -823,17 +842,6 @@
; number^2 physical level of detail of the sculpt texture. 16x16 - 256 verticies
mesh_physical_lod = 16
; ##
; ## Physics logging settings - logfiles are saved to *.DIF files
; ##
; default is false
;physics_logging = true
;; every n simulation iterations, the physics snapshot file is updated
;physics_logging_interval = 50
;; append to existing physics logfile, or overwrite existing logfiles?
;physics_logging_append_existing_logfile = true
; ##
; ## Joint support
; ##