Changeset - 10e4f755beca
[Not reviewed]
default
0 1 0
David McClosky - 18 years ago 2007-06-15 18:46:16
dmcc@bigasterisk.com
prof: move imports closer to when we need them (if we need them at all)
I mean, I guess what I'm saying is that it's better, okay? Get off my
back!
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/prof.py
Show inline comments
 
import hotshot, hotshot.stats
 
import sys, traceback
 

	
 
def run(main, profile=False):
 
    if not profile:
 
        main()
 
        return
 
    
 
    import hotshot, hotshot.stats
 
    p = hotshot.Profile("/tmp/pro")
 
    p.runcall(main)
 
    p.close()
 
    hotshot.stats.load("/tmp/pro").sort_stats('time').print_stats()
 
    
 
def watchPoint(filename, lineno, event="call"):
0 comments (0 inline, 0 general)