For a detailed explanation on benchnmarking with google benchmark see my blog post.
To start, the repository has to be cloned:
$ git clone https://github.com/RobertCrupa/microbenchmarking.git
$ cd microbenchmarking
To create build folder and run tests:
$ cmake -S . -B build
$ cmake --build build
$ cd build && ./benchmark