This commit is contained in:
Dominic Hamon 2015-11-05 09:53:08 -08:00
parent 7c8d8c9dd7
commit 4499e8e415

View File

@ -165,6 +165,7 @@ static void BM_MultiThreaded(benchmark::State& state) {
}
}
BENCHMARK(BM_MultiThreaded)->Threads(2);
```
To prevent a value or expression from being optimized away by the compiler
the `benchmark::DoNotOptimize(...)` function can be used.