how many times is a line of code executed when the program is running?
Is there some tool that开发者_C百科 tells me the time the program dwells on each line/block of code in python?
Thanks.
Karthick
Look at the profiler that is part of the standard Python distribution. The Python docs include some examples.
I'm a big fan of line_profiler and kernprof:
http://packages.python.org/line_profiler/
精彩评论