← Browse all tools

Go Back
Report Abuse

Google Benchmark

Microbenchmark support library for C++

Tool overview

Google Benchmark is a C++ library to benchmark code snippets, in a way similar to unit tests. A benchmark is a function that receives a state object and loops over the code to time; it is registered with a macro, and the library decides how many iterations are needed for a stable measurement.

Benchmarks can be parameterised with ranges of arguments, run on several threads, and report custom counters and asymptotic complexity. Results are printed to the console or written as JSON or CSV, and companion scripts compare two sets of results. Python bindings are also available.

The library is developed by Google and is free and open source under the Apache 2.0 licence. Its API is structurally close to GoogleTest.

Screenshots & video

Community reviews

Login to Write Your Review

There are no reviews yet.

Source & attribution

Original contributor
Jean-Baptiste CROUIGNEAU
External references
https://github.com/google/benchmark
https://google.github.io/benchmark/