A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2004-January/042232.html below:

[Python-Dev] Hotshot

[Python-Dev] HotshotWalter Dörwald walter at livinglogic.de
Sat Jan 24 07:03:01 EST 2004
Fred L. Drake, Jr. wrote:

> Nick Bastin writes:
>  > Does anybody know the current state of hotshot?  I read on some of the 
>  > twisted mailing lists a while back that someone tried it but had some 
>  > problems (can't remember what off the top of my head...have to search 
>  > the archives), and was wondering if it was regarded as complete (and if 
>  > there was any documentation that talks about how the code coverage 
>  > aspect is supposed to be used).
> 
> HotShot has had some attention, and has been found useful, but I don't
> think of it as really finished.

What's missing from hotshot is a little script that makes it
possible to use hotshot from the command line (just like
profile.py), i.e. something like this:

import sys, os.path, hotshot, hotshot.stats

prof = hotshot.Profile("hotshot.prof")
filename = sys.argv[1]
del sys.argv[0]
sys.path.insert(0, os.path.dirname(filename))
prof.run("execfile(%r)" % filename)
prof.close()
stats = hotshot.stats.load("hotshot.prof")
stats.sort_stats("time", "calls")
stats.print_stats()

The biggest problem I had with hotshot is the filesize. I was
using the above script to profile a script which normally
runs for about 10-15 minutes. After ca. 20 minutes the size
of hotshot.prof was over 1 gig. Is there any possibility to
reduce the filesize?

Bye,
    Walter Dörwald



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4