google-benchmark

C++ microbenchmark support library for performance testing

brewmacoslinux
Try with needOr install directly
Source

About

C++ microbenchmark support library

Commands

google-benchmark

Examples

Link google-benchmark library in CMakeLists.txt for C++ benchmarks$ find_package(benchmark REQUIRED) && target_link_libraries(my_benchmark benchmark::benchmark)
Run a compiled benchmark binary with custom output format$ ./my_benchmark --benchmark_format=json > results.json
Execute benchmarks with specific repetitions and time limit$ ./my_benchmark --benchmark_repetitions=5 --benchmark_min_time=1.0