[ANN] Benchmarker 1.0.0 - a samll utility for benchmarking

K

kwatch

Hi,

I released Benchmarker 1.0.0.
http://pypi.python.org/pypi/Benchmarker/

Benchmarker is a small library for benchmarking.


Example
-------

ex.py::

def fib(n):
return n <= 2 and 1 or fib(n-1) + fib(n-2)
from benchmarker import Benchmarker
bm = Benchmarker() # or Benchmarker(width=30, out=sys.stderr,
header=True)
## Python 2.5 or later
with bm('fib(n) (n==34)'): fib(34)
with bm('fib(n) (n==35)'): fib(35)
## Python 2.4
bm('fib(n) (n==34)').run(lambda: fib(34))
bm('fib(n) (n==35)').run(lambda: fib(35))

Output::

$ python ex.py
utime stime
total real
fib(n) (n==34) 4.3700 0.0200 4.3900
4.9449
fib(n) (n==35) 7.1500 0.0500 7.2000
8.0643


Download
--------

http://pypi.python.org/pypi/Benchmarker/

Installation::

## if you have installed easy_install:
$ sudo easy_install Benchmarker
## or download Benchmarker-1.0.0.tar.gz and install it
$ wget http://pypi.python.org/packages/source/B/Benchmarker/Benchmarker-1.0.0.tar.gz
$ tar xzf Benchmarker-1.0.0.tar.gz
$ cd Benchmarker-1.0.0/
$ sudo python setup.py install


License
-------

Public Domain


Copyright
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,763
Messages
2,569,560
Members
45,035
Latest member
HoTaKeDai

Latest Threads

Top