File tree Expand file tree Collapse file tree
examples/google_benchmark_cmake Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6464 runner : " ubuntu-latest"
6565 - codspeed-mode : " walltime"
6666 runner : " codspeed-macro"
67+ - codspeed-mode : " walltime"
68+ runner : " macos-latest"
69+ benchmark-filter : " BM_FibonacciRecursive_Darwin"
6770 - codspeed-mode : " off"
6871 runner : " ubuntu-latest"
6972 runs-on : ${{ matrix.runner }}
9396 if : matrix.codspeed-mode != 'off'
9497 with :
9598 mode : ${{ matrix.codspeed-mode }}
96- run : examples/google_benchmark_cmake/build/benchmark_example
99+ run : examples/google_benchmark_cmake/build/benchmark_example --benchmark_filter=${{ matrix.benchmark-filter || '.*' }}
97100
98101 bazel-integration-tests :
99102 strategy :
Original file line number Diff line number Diff line change @@ -16,6 +16,17 @@ static void BM_FibonacciRecursive(benchmark::State& state) {
1616}
1717BENCHMARK (BM_FibonacciRecursive)->Arg(35 )->MinTime(5 );
1818
19+ #ifdef __APPLE__
20+ static void BM_FibonacciRecursive_Darwin (benchmark::State& state) {
21+ int n = static_cast <int >(state.range (0 ));
22+ for (auto _ : state) {
23+ uint64_t result = fibonacci_recursive (n);
24+ benchmark::DoNotOptimize (result);
25+ }
26+ }
27+ BENCHMARK (BM_FibonacciRecursive_Darwin)->Arg(35 )->MinTime(5 );
28+ #endif
29+
1930static uint64_t fibonacci_iterative (int n) {
2031 if (n <= 1 ) return n;
2132
You can’t perform that action at this time.
0 commit comments