Profiling problem

Darrell news at dorb.com
Fri May 7 14:25:46 EDT 1999


I believe that the contents of profile.run() isn't running in the same name
space as doit(). Suspect you will need some glue code then
run('glue(slow_dog()') to pick up self from some other place.

--Darrell


> >>> class C:
> ...    def slow_dog( self ):
> ...       import time
> ...       time.sleep(5)
> ...    def doit( self ):
> ...       import profile
> ...       profile.run( 'self.slow_dog()' )
> ...







More information about the Python-list mailing list