[Python-Dev] s/hotshot/lsprof
Armin Rigo
arigo at tunes.org
Mon Nov 21 22:15:56 CET 2005
Hi Floris,
On Mon, Nov 21, 2005 at 04:41:04PM +0000, Floris Bruynooghe wrote:
> > Now Brett's
> > student, Floris, extended hotshot to allow custom timers. This is
> > essential, because it enables testing. The timing parts of hotshot were
> > not tested previously.
>
> Don't be too enthousiastic here.
Testing is done by feeding the profiler something that is not a real
timer function, but gives easy to predict answers. Then we check that
the profiler accounted all this pseudo-time to the correct functions in
the correct way. This is one of the few way to reliably test a
profiler, that's why it is essential.
> Iirc I did compare the output of test_profile between profile and my
> wrapper. This was one of my checks to make sure it was wrapped
> correctly. So could you tell me how they are different?
test_profile works as I explained above. Running it with hotshot shows
different numbers, which means that there is a bug (and not just some
difference in real speed). More precisely, a specific number of the
pseudo-clock-ticks are dropped for no reason other than a bug, and
doesn't show up in the final results at all.
A bientot,
Armin
More information about the Python-Dev
mailing list