[C++-sig] profiling python extension

2010-02-27 Thread Alexey Akimov
Dear all, Does anyone know how one may profile a python extention? There is a bunch of literature on profiling of pure binaries (programs and even libraries), pure python code, etc. However the profiling of a python module from python script seems a tricky procedure. What I tried is to pass varian

Re: [C++-sig] profiling python extension

2010-02-27 Thread Ralf W. Grosse-Kunstleve
I usually use oprofile. Typically, I write a small piece of python to call the extension multiple times so it runs the critical code for about a minute (10 seconds will probably do, too), then the extension code is the only thing showing up near the top of the oprofile stats. It is important that n