Hi,
This is to check for bottlenecks in Python code.
The module Profiler provides some classes to check how long processing takes.
How to use:
create a Profiler instance (e.g. TimeProfiler).
give it a title to distinguish it from other Profiler outputs
give it a period - the Profiler will print its results after collecting this number of measures
stored it somewhere (e.g. at the object)
start measure before the code in question
end the measure after the code in question
Output example:
Blender Game Engine Started
complete time: profiled 100 measures - avg:0.011, min0.00410, max:0.018
complete time: profiled 100 measures - avg:0.010, min0.00402, max:0.017
complete time: profiled 100 measures - avg:0.010, min0.00398, max:0.017
Blender Game Engine Finished
You can have as much profilers as you want.
It runs in 2.49, 2.5 and 2.6
Attachments
ProfilerDemo.blend (38.7 KB)