mirror of
https://github.com/google/benchmark.git
synced 2024-11-25 22:47:20 +00:00
7a767012f1
This patch adopts a new internal structure for how timings are performed. Currently every iteration of a benchmark checks to see if it has been running for an appropriate amount of time. Checking the clock introduces noise into the timings and this can cause inconsistent output from each benchmark. Now every iteration of a benchmark only checks an iteration count to see if it should stop running. The iteration count is determined before hand by testing the benchmark on a series of increasing iteration counts until a suitable count is found. This increases the amount of time it takes to run the actual benchmarks but it also greatly increases the accuracy of the results. This patch introduces some breaking changes. The notable breaking changes are: 1. Benchmarks run on multiple threads no generate a report per thread. Instead only a single report is generated. 2. ::benchmark::UseRealTime() was removed and replaced with State::UseRealTime().
5 lines
79 B
C++
5 lines
79 B
C++
#define HAVE_THREAD_SAFETY_ATTRIBUTES
|
|
#include "../src/mutex.h"
|
|
|
|
int main() {}
|