Introducing benchmark

Wednesday, January 15, 2014

It is my pleasure to announce a new C++ library for running Microbenchmarks. Inspired by googletest and the xUnit architecture, benchmark supports value- and type-parameterized benchmarks, various options for running the benchmarks including multithreading, and custom report generation.

The framework is lightweight but powerful. An example portion of a run comparing the insertion of elements into a std::vector and a std::list is shown in the screenshot below.
Unlike googletest, the benchmarks are not automatically discovered, but this allows greater flexibility in terms of how the benchmarks are run, and the parameters that are used by the benchmark.

The benchmark library is released as an open source project under the Apache license, and is available now on github. The repository includes some test code demonstrating various use-cases for the framework. If you’d like to send feedback, or have any questions, please open issues through github, or see our discussion group. I hope you find this useful.

By Dominic Hamon, Network Research Team