Profiling your script

The hotshot profiler is available in Python to give a complete rundown of the execution of your script. Hotshot would have to be installed for you to execute.

It can be used as follows:

import hotshot
import myfunction
prof = hotshot.Profile('my_hotshot _stats')
prof.run('myfunction').close()

Then to view a summary of the profiler's results use the commands:

import hotshot.stats
hotshot.stats.load('my_hotshot_stats').strip_dirs().sort_stats('time').print_stats()  
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.145.15.205