[Twisted-Python] HotShot vs. Old Profiler

Itamar Shtull-Trauring twisted at itamarst.org
Tue Feb 12 05:27:18 MST 2002


So, I tried comparing old profiler with HotShot (2.2's new C based 
profiler). I ran a simple twisted web server that serves from memory.

Running with Python 2.2 I got 350 hits/second. time command says it 
takes 11 CPU seconds, and with time the hits/sec is a bit lower.

Running with old profiler: ~70 hits/second, profiler said it took 2-3 
CPU seconds to run (don't ask me why)

Running with HotShot: 290 hits/second, it said it took 15 CPU seconds 
(11 of which were in doSelect on its own).


Conclusions:
HotShot is much much much much much much much better than old profiler
We need to optimize doSelect something wicked
HotShot still has bugs (it would fail occasionally)

I have a command-line interface to hotshot at http://itamarst.org/software/





More information about the Twisted-Python mailing list