py.bench -- py.test based benchmarking
commit05d9053ff446f888b3b497937e92e2337ec5c9c6
authorKirill Smelkov <kirr@landau.phys.spbu.ru>
Mon, 1 Sep 2008 19:36:30 +0000 (1 23:36 +0400)
committerKirill Smelkov <kirr@landau.phys.spbu.ru>
Mon, 1 Sep 2008 19:36:30 +0000 (1 23:36 +0400)
treed01455b29d9a30624a50a97345c88533b29729d6
parent957696d113adce0c8b0f2f787286d9b8e2930aea
py.bench -- py.test based benchmarking

The idea is to reuse py.test infrastructure to

  o collect tests
  o run collected tests
  o present test runs results

and substitute 'test' -> 'benchmark'.

What we do is

  1. collect benchmark files that start with 'bench_' prefix
  2. execute two kind of benchmarks

     a. 'bench_<smth>', and
     b. 'timeit_<smth>',

for bennch_XXX we simple mesure time to execute, and for timeit_XXX in
essence we do IPython's %timeit on it.

For actually running benchmarks small py.test like utility is provided
and installed for the benefit of all.

Signed-off-by: Kirill Smelkov <kirr@landau.phys.spbu.ru>
Signed-off-by: Ondrej Certik <ondrej@certik.cz>
bin/py.bench [new file with mode: 0755]
setup.py
sympy/utilities/benchmarking.py [new file with mode: 0644]