469,292 Members | 1,318 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,292 developers. It's quick & easy.

problem with hot shot stats

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
2 1533
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
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.

Similar topics

6 posts views Thread by KefX | last post: by
4 posts views Thread by Daqian Yang | last post: by
2 posts views Thread by Pavan Zope | last post: by
3 posts views Thread by Sean Shanny | last post: by
9 posts views Thread by ankitdesai | last post: by
4 posts views Thread by Laurence Breeze | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.