[Python-Dev] s/hotshot/lsprof
Armin Rigo
arigo at tunes.org
Mon Nov 21 22:23:09 CET 2005
Hi Floris,
On Mon, Nov 21, 2005 at 04:45:03PM +0000, Floris Bruynooghe wrote:
> Afaik I did test recursive calls etc.
It seems to show up in any test case I try, e.g.
import hprofile
def wait(m):
if m > 0:
wait(m-1)
def f(n):
wait(n)
if n > 1:
return n*f(n-1)
else:
return 1
hprofile.run("f(500)", 'dump-hprof')
The problem is in the cumulative time column, which (on this machine)
says 163 seconds for both f() and wait(). The whole program finishes in
1 second... The same log file loaded with hotshot.stats doesn't have
this problem.
A bientot,
Armin.
More information about the Python-Dev
mailing list