diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b20dfdd..14f4cfc 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -64,6 +64,9 @@ jobs: runner: "ubuntu-latest" - codspeed-mode: "walltime" runner: "codspeed-macro" + - codspeed-mode: "walltime" + runner: "macos-latest" + benchmark-filter: "BM_FibonacciRecursive_Darwin" - codspeed-mode: "off" runner: "ubuntu-latest" runs-on: ${{ matrix.runner }} @@ -93,7 +96,7 @@ jobs: if: matrix.codspeed-mode != 'off' with: mode: ${{ matrix.codspeed-mode }} - run: examples/google_benchmark_cmake/build/benchmark_example + run: examples/google_benchmark_cmake/build/benchmark_example --benchmark_filter=${{ matrix.benchmark-filter || '.*' }} bazel-integration-tests: strategy: diff --git a/core/CMakeLists.txt b/core/CMakeLists.txt index 8a7eca0..ccb03ee 100644 --- a/core/CMakeLists.txt +++ b/core/CMakeLists.txt @@ -15,7 +15,7 @@ include(FetchContent) FetchContent_Declare( instrument_hooks_repo GIT_REPOSITORY https://github.com/CodSpeedHQ/instrument-hooks - GIT_TAG 89fb72a076ec71c9eca6eee9bca98bada4b4dfb4 + GIT_TAG d83209f4ad0db15c2bff10aa1bd6f6f12dadbe2e ) FetchContent_MakeAvailable(instrument_hooks_repo) FetchContent_GetProperties(instrument_hooks_repo) diff --git a/core/instrument-hooks b/core/instrument-hooks index 89fb72a..d83209f 160000 --- a/core/instrument-hooks +++ b/core/instrument-hooks @@ -1 +1 @@ -Subproject commit 89fb72a076ec71c9eca6eee9bca98bada4b4dfb4 +Subproject commit d83209f91683cf4c1677bdde28e0e43ca201f6ed diff --git a/examples/google_benchmark_cmake/fibonacci_bench.hpp b/examples/google_benchmark_cmake/fibonacci_bench.hpp index 6c7a677..c79150a 100644 --- a/examples/google_benchmark_cmake/fibonacci_bench.hpp +++ b/examples/google_benchmark_cmake/fibonacci_bench.hpp @@ -16,6 +16,17 @@ static void BM_FibonacciRecursive(benchmark::State& state) { } BENCHMARK(BM_FibonacciRecursive)->Arg(35)->MinTime(5); +#ifdef __APPLE__ +static void BM_FibonacciRecursive_Darwin(benchmark::State& state) { + int n = static_cast(state.range(0)); + for (auto _ : state) { + uint64_t result = fibonacci_recursive(n); + benchmark::DoNotOptimize(result); + } +} +BENCHMARK(BM_FibonacciRecursive_Darwin)->Arg(35)->MinTime(5); +#endif + static uint64_t fibonacci_iterative(int n) { if (n <= 1) return n;