Tools/Debugging/Python Profile

= Profiling Python Code =

The 'profile' module
This example shows how to use the cProfile Python module to show script performance.

https://developer.blender.org/diffusion/B/browse/master/release/scripts/modules/bpy/__init__.py;711e3564b808ab802c503409e7740b0ca9b6ef65$68

The function call shows:

This example shows how a the function call can be profiled.

This prints the top 20 cumulative functions.

Heres an example of what the output may look like.