By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,091 Members | 1,546 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,091 IT Pros & Developers. It's quick & easy.

problem with hot shot stats

P: n/a
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?

Oct 10 '06 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Monu wrote:
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

Oct 10 '06 #2

P: n/a
But I couldn't find any way to get lineevents in cProfile

On Oct 11, 3:49 am, "Klaas" <mike.kl...@gmail.comwrote:
Monu wrote:
HI All,
I am getting problem in usinghotshotprofiler.
When Ihotshotwith 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?hotshothas never reached production-ready stability, imo. Use the new
cProfile module in python2.5

-Mike
Oct 11 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.