472,333 Members | 1,061 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,333 software developers and data experts.

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 1623
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: KefX | last post by:
Hi guys! I'm still a bit of a Python newbie, but regardless I decided to embed Python into a plugin for a freeware (closed-source) Windows music...
2
by: CharitiesOnline | last post by:
Hello, I have set this script up to add paging to a search results page. Which on the first page works fine. I calculates how many pages there...
4
by: Daqian Yang | last post by:
hello all GCC gives me this error: g++ -c -o x-main_a2.o x-main_a2.cpp g++ -Wall -pedantic -c xfile_a2.cpp g++ -Wall -pedantic...
2
by: Pavan Zope | last post by:
Hello I am facing a weired problem in calling a fortran routine from c. The fortran function in question is like this:- subroutine...
3
by: Sean Shanny | last post by:
To all, We are running postgresql 7.4.1 on an G5 with dual procs, OSX 10.3.3 server, 8GB mem, attached to a fully configured 3.5TB XRaid box via...
9
by: ankitdesai | last post by:
I would like to parse a couple of tables within an individual player's SHTML page. For example, I would like to get the "Actual Pitching...
4
by: Laurence Breeze | last post by:
I wonder if anyone can help ... Today I tried to create another non-clustered index on a table. This failed as I apparently already had 249...
1
by: chriskent | last post by:
Hi, I have an unusual situation whereby we create a Window during initialisation. We have used this code for many years and have found one unusual...
10
by: vijayarl | last post by:
Hi All, Thanks in Advance.. Problem statement: Need to display the raw stats file report but script count the stat's file which has *.xls ...
0
by: concettolabs | last post by:
In today's business world, businesses are increasingly turning to PowerApps to develop custom business applications. PowerApps is a powerful tool...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: teenabhardwaj | last post by:
How would one discover a valid source for learning news, comfort, and help for engineering designs? Covering through piles of books takes a lot of...
0
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
by: CD Tom | last post by:
This happens in runtime 2013 and 2016. When a report is run and then closed a toolbar shows up and the only way to get it to go away is to right...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
0
by: Matthew3360 | last post by:
Hi there. I have been struggling to find out how to use a variable as my location in my header redirect function. Here is my code. ...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.