unitbench 0.1 released!

After writing cppbench, a C++ benchmark framework, I felt inspired to take the next step.  I wanted a benchmark library that was similar to unittest in python.  I started working on unitbench.  I ended up with a library that allows you to start a benchmark with ‘bench’ and it will be run and timed.  It has functions that can be overloaded to denote the number of warmup runs to perform and the input to the benchmarks.  See the documentation below for full examples and all functions.

Features:

unitbench documentation

unitbench pypi page (with downloads)

unitbench source code

I’d love to hear any feedback.  All comments are appreciated.  If you notice any bugs or weird behavior post a bug report to bitbucket or leave a comment here.  I’ll try to address it as soon as possible.  The same goes for feature requests.

Posted on March 8, 2011 at 9:23 am by Joe · Permalink
In: Announcement, Python · Tagged with: ,

3 Responses

Subscribe to comments via RSS

  1. Written by William
    on March 10, 2011 at 5:50 am
    Reply · Permalink

    Thanks, it’s really awesome!! :D

  2. Written by AlekSi
    on July 30, 2011 at 7:37 am
    Reply · Permalink

    Why not to use timeit module?

    • Written by Joe
      on July 30, 2011 at 12:14 pm
      Reply · Permalink

      This has a number of advantages over timeit. Unitbench can output CSV for easy import into spreadsheet programs. It can report user and system time in addition to wall clock time. Unitbench calculates more statistics for you. While none of the default reporters output them, the minimum, maximum, standard deviation, and variance are all calculated in addition to the average runtime. There is only so much space in the console. Perhaps another form of output should be added. Also setting up the Benchmark class, you can simply add ‘bench_’ functions to run additional benchmarks.

      That said, I’ve been working on a new release of unitbench. It will have decorators which can be added to any function. I may add another reporter that outputs all available data, as that does seem like it’s missing.

Subscribe to comments via RSS

Leave a Reply