Profile your Python Program
import profile
profile.run(‘main()’)
you should get a similar result on the amount of CPU time your program takes:
66 function calls in 0.069 CPU seconds
Ordered by: standard name
ncalls tottime percall cumtime percall filename:lineno(function)
7 0.003 0.000 0.003 0.000 :0(gethostbyname)
7 0.003 0.000 0.003 0.000 :0(gethostname)
1 0.003 0.003 0.003 0.003 :0(menuBarLayout)
1 0.000 0.000 0.000 0.000 :0(open)
4 0.001 0.000 0.001 0.000 :0(popupMenu)
14 0.000 0.000 0.000 0.000 :0(replace)
1 0.028 0.028 0.028 0.028 :0(setprofile)
1 0.014 0.014 0.014 0.014 :0(showWindow)
6 0.000 0.000 0.000 0.000 :0(split)
1 0.000 0.000 0.000 0.000 :0(stat)
12 0.000 0.000 0.000 0.000 :0(strip)
1 0.000 0.000 0.041 0.041 <string>:1(<module>)

Chris Chia





Entries RSS
No comments
Jump to comment form | comments rss [?] | trackback uri [?]