libcopp
2.2.0
atframework
cmake-toolset
test
benchmark.cpp
Go to the documentation of this file.
1
// Copyright 2021 atframework
2
3
#include <benchmark/benchmark.h>
4
5
#include <atomic>
6
7
static
void
BM_SomeFunction
(benchmark::State& state) {
8
// Test for benchmark_main
9
std::atomic<int> a;
10
++a;
11
}
12
// Register the function as a benchmark
13
BENCHMARK
(
BM_SomeFunction
);
14
// Run the benchmark
15
BENCHMARK_MAIN
();
BENCHMARK_MAIN
BENCHMARK_MAIN()
BM_SomeFunction
static void BM_SomeFunction(benchmark::State &state)
Definition:
benchmark.cpp:7
BENCHMARK
BENCHMARK(BM_SomeFunction)
Generated by
1.9.1