From: Matthew Wilson on 10 May 2010 16:13 I know how to use timeit and/or profile to measure the current run-time cost of some code. I want to record the time used by some original implementation, then after I rewrite it, I want to find out if I made stuff faster or slower, and by how much. Other than me writing down numbers on a piece of paper on my desk, does some tool that does this already exist? If it doesn't exist, how should I build it? Matt
From: Steven D'Aprano on 10 May 2010 22:06 On Mon, 10 May 2010 20:13:44 +0000, Matthew Wilson wrote: > I know how to use timeit and/or profile to measure the current run-time > cost of some code. > > I want to record the time used by some original implementation, then > after I rewrite it, I want to find out if I made stuff faster or slower, > and by how much. > > Other than me writing down numbers on a piece of paper on my desk, does > some tool that does this already exist? > > If it doesn't exist, how should I build it? from timeit import Timer before = Timer(before_code, setup) after = Timer(after_code, setup) improvement = min(before.repeat()) - min(after.repeat()) -- Steven
From: Martin v. Loewis on 11 May 2010 02:44 Matthew Wilson wrote: > I know how to use timeit and/or profile to measure the current run-time > cost of some code. > > I want to record the time used by some original implementation, then > after I rewrite it, I want to find out if I made stuff faster or slower, > and by how much. > > Other than me writing down numbers on a piece of paper on my desk, does > some tool that does this already exist? I recommend to use rrd. This can record time series, and then generate diagrams. Regards, Martin
From: exarkun on 10 May 2010 19:04 On 08:13 pm, matt(a)tplus1.com wrote: >I know how to use timeit and/or profile to measure the current run-time >cost of some code. > >I want to record the time used by some original implementation, then >after I rewrite it, I want to find out if I made stuff faster or >slower, >and by how much. > >Other than me writing down numbers on a piece of paper on my desk, does >some tool that does this already exist? > >If it doesn't exist, how should I build it? http://github.com/tobami/codespeed sounds like the kind of thing you're looking for. You can see an example of what it does at http://speed.pypy.org/ Jean-Paul > >Matt > >-- >http://mail.python.org/mailman/listinfo/python-list
|
Pages: 1 Prev: Hex String Next: [Epydoc-devel] How to? epydoc --top=README |