Skip to content

Commit 81983fc

Browse files
committed
Upload benchmark results
1 parent d91d451 commit 81983fc

2 files changed

Lines changed: 16 additions & 26 deletions

File tree

‎.github/workflows/benchmark.yml‎

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@ name: Benchmark
33
on:
44
push:
55
branches: [main]
6-
pull_request: {} # Allow CodSpeed to trigger backtest performance analysis
6+
pull_request: {}
77
workflow_dispatch: {}
88

99
permissions:
1010
contents: read
11-
id-token: write
1211

1312
concurrency:
1413
group: ${{ github.workflow }}-${{ github.job }}-${{ github.ref }}
@@ -20,13 +19,13 @@ defaults:
2019

2120
jobs:
2221
benchmarks:
23-
name: Linux - ${{ matrix.sys.name }} - ${{ matrix.sys.mode }}
22+
name: Linux - ${{ matrix.sys.name }}
2423
runs-on: namespace-profile-benchmark;container.privileged=true;container.host-pid-namespace=true
2524
strategy:
2625
matrix:
2726
sys:
28-
- { name: "sse4.2", flags: "-march=x86-64-v2", mode: "walltime" }
29-
- { name: "avx2", flags: "-march=x86-64-v3", mode: "walltime" }
27+
- { name: "sse4.2", flags: "-march=x86-64-v2" }
28+
- { name: "avx2", flags: "-march=x86-64-v3" }
3029
steps:
3130
- name: Checkout code
3231
uses: actions/checkout@v6
@@ -37,21 +36,25 @@ jobs:
3736
create-args: >-
3837
cmake
3938
ninja
39+
benchmark
4040
xsimd=14.3.0
4141
init-shell: bash
4242
cache-downloads: true
4343
- name: Build benchmarks
4444
run: |
45-
# Codspeed deps need C11 (not 23)
4645
cmake -G Ninja -B build/ \
4746
-D CMAKE_BUILD_TYPE="RelWithDebInfo" \
4847
-D CMAKE_CXX_FLAGS="${{ matrix.sys.flags }}" \
49-
-D BUILD_BENCHMARK=ON \
50-
-D CMAKE_C_STANDARD=11 \
51-
-D CODSPEED_MODE="${{ matrix.sys.mode }}"
48+
-D BUILD_BENCHMARK=ON
5249
cmake --build build --target benchmark_xsimd_algorithm --parallel 8
5350
- name: Run benchmarks
54-
uses: CodSpeedHQ/action@v5
51+
run: |
52+
./build/benchmark/benchmark_xsimd_algorithm \
53+
--benchmark_repetitions=3 \
54+
--benchmark_out=benchmark-${{ matrix.sys.name }}.json \
55+
--benchmark_out_format=json
56+
- name: Upload results
57+
uses: actions/upload-artifact@v4
5558
with:
56-
mode: ${{ matrix.sys.mode }}
57-
run: ./build/benchmark/benchmark_xsimd_algorithm --benchmark_repetitions=3
59+
name: benchmark-${{ github.event.pull_request.head.sha || github.sha }}-${{ matrix.sys.name }}
60+
path: benchmark-${{ matrix.sys.name }}.json

‎benchmark/CMakeLists.txt‎

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,20 +14,7 @@ if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
1414
find_package(xsimd-algorithm REQUIRED CONFIG)
1515
endif ()
1616

17-
# No simple packaging of Codspeed
18-
if(DEFINED CODSPEED_MODE)
19-
include(FetchContent)
20-
FetchContent_Declare(
21-
google_benchmark
22-
GIT_REPOSITORY https://github.com/CodSpeedHQ/codspeed-cpp
23-
GIT_TAG v2.4.0
24-
SOURCE_SUBDIR google_benchmark
25-
)
26-
set(BENCHMARK_DOWNLOAD_DEPENDENCIES ON)
27-
FetchContent_MakeAvailable(google_benchmark)
28-
else()
29-
find_package(benchmark REQUIRED)
30-
endif()
17+
find_package(benchmark REQUIRED)
3118

3219
# Regular benchmark of algorithm implemented here
3320
add_executable(

0 commit comments

Comments
 (0)