ANN: Profiler for multi-threaded applications

Itamar Shtull-Trauring itamarst at yahoo.com
Wed Aug 29 21:40:41 CEST 2001


Hi,

I've written a profiler for multi-threaded python programs, based on 
some posts I've read suggesting using a profiler object for each thread. 
When the program is done the profiler merges the results from all the 
profiler objects, and prints results.

Usage:
$ python threaded_profile.py yourapp.py

URL:
http://itamarst.org/downloads/threaded_profile.py

I'm not sure the results are in any way accurate, but it has helped me 
finding at least one hot spot I wouldn't have been able to find 
otherwise, since it was in a thread (apparently opening files is *very* 
expensive.)

Comments are welcome!

-- 
Itamar Shtull-Trauring
http://itamarst.org





More information about the Python-list mailing list