Search code examples
c++benchmarkinggoogle-benchmark

In google benchmark, what is the meaning of Iterms_per_seconds and Why we need fixture?


In google benchmark: there is a Iterms_per_seconds result and we can use the fixture way to test the bench.

enter image description here

enter image description here

  1. What is the meaning of Iterms_per_seconds in google bench? Is it stands the throuput?
  2. Why need the fixture to test benchmark? In this way , can we get more convenience?

Solution

    1. items per second is the throughput. items is defined by the benchmark author and is completely optional. the benchmark author can also define bytes processed for bytes per second, if that is more meaningful.

    2. you don't need fixtures, but they provide a way to do one-off setup and teardown.