|
|
@ -3299,14 +3299,14 @@ def profile_main1():
|
|
|
|
import pstats
|
|
|
|
import pstats
|
|
|
|
prof = cProfile.Profile()
|
|
|
|
prof = cProfile.Profile()
|
|
|
|
prof = prof.runctx("real_main()", globals(), locals())
|
|
|
|
prof = prof.runctx("real_main()", globals(), locals())
|
|
|
|
print "<pre>"
|
|
|
|
print("<pre>")
|
|
|
|
stats = pstats.Stats(prof)
|
|
|
|
stats = pstats.Stats(prof)
|
|
|
|
stats.sort_stats("time") # Or cumulative
|
|
|
|
stats.sort_stats("time") # Or cumulative
|
|
|
|
stats.print_stats(80) # 80 = how many to print
|
|
|
|
stats.print_stats(80) # 80 = how many to print
|
|
|
|
# The rest is optional.
|
|
|
|
# The rest is optional.
|
|
|
|
# stats.print_callees()
|
|
|
|
# stats.print_callees()
|
|
|
|
# stats.print_callers()
|
|
|
|
# stats.print_callers()
|
|
|
|
print "</pre>"
|
|
|
|
print("</pre>")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
main = profile_main1
|
|
|
|
main = profile_main1
|
|
|
|