mirror of
https://gitee.com/openharmony/third_party_benchmark
synced 2024-11-23 07:20:12 +00:00
e776aa0275
* Add benchmark_main library with support for Bazel. * fix newline at end of file * Add CMake support for benchmark_main. * Mention optionally using benchmark_main in README.
9 lines
177 B
C++
9 lines
177 B
C++
#include "benchmark/benchmark.h"
|
|
|
|
void BM_empty(benchmark::State& state) {
|
|
for (auto _ : state) {
|
|
benchmark::DoNotOptimize(state.iterations());
|
|
}
|
|
}
|
|
BENCHMARK(BM_empty);
|