problem with hot shot stats

M

Monu

HI All,
I am getting problem in using hotshot profiler.
When I hotshot with lineevents=0, it works fine,
but when I use lineevents=1, I get error in stats

here is my code:

import hotshot, hotshot.stats
prof = hotshot.Profile("test.prof",lineevents=1)
prof.start()
main()
prof.stop()
prof.close()
stats = hotshot.stats.load("test.prof")
stats.strip_dirs()
stats.sort_stats('time', 'calls')
stats.print_stats(20)

I get following error:
File "test.py", line 1371, in benchmark
stats = hotshot.stats.load("test.prof")
File "/usr/lib64/python2.4/hotshot/stats.py", line 12, in load
return StatsLoader(filename).load()
File "/usr/lib64/python2.4/hotshot/stats.py", line 29, in load
for event in log:
File "/usr/lib64/python2.4/hotshot/log.py", line 113, in next
filename, firstlineno, funcname = self._stack[-1]
IndexError: list index out of range

Can anybody help to figure out the problem please?
 
K

Klaas

Monu said:
HI All,
I am getting problem in using hotshot profiler.
When I hotshot with lineevents=0, it works fine,
but when I use lineevents=1, I get error in stats

Can anybody help to figure out the problem please?

hotshot has never reached production-ready stability, imo. Use the new
cProfile module in python2.5

-Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top