instrumenting Python code

brueckd at tbye.com brueckd at tbye.com
Wed Mar 27 12:08:13 EST 2002


On Wed, 27 Mar 2002, Skip Montanaro wrote:

>
>     Dave> The hotshot module doesn't appear to have any documentation
>     Dave> yet.
>
> That's true.  Here's my simple usage scenario:
>
>     import hotshot
>     profiler = hotshot.Profile("/home/skip/tmp/csv2csv.prof")
>     profiler.run("main()")
>     profiler.close()
>     stats = hotshot.Stats("/home/skip/tmp/csv2csv.prof")
>     stats.print_stats()

Thank you! This is way cleaner than what I posted!

Now, about profiling multithreaded applications. Do you have any
suggestions?

-Dave





More information about the Python-list mailing list