Python Tools for Visual Studio also supports profiling your Python program (this feature is only available for CPython based interpreters and requires Visual Studio 2010 Ultimate. You must also be running SP1 of VS 2010 or later). To start profiling
you can go to the Analyze menu and and select Launch Python Profiling. You can then use the dialog to configure how you’d like to setup profiling:
When you click OK the profiler will run and then open the resulting performance report. You can then drill into which functions are consuming the most time.
Note: Please see the Cluster/MPI section for Profiling code on a cluster.