Skip to content

Commit b72834a

Browse files
committed
Run core benchmarks with CodSpeed
1 parent cd12d51 commit b72834a

File tree

1 file changed

+75
-0
lines changed

1 file changed

+75
-0
lines changed

.github/workflows/codspeed.yml

Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one
2+
# or more contributor license agreements. See the NOTICE file
3+
# distributed with this work for additional information
4+
# regarding copyright ownership. The ASF licenses this file
5+
# to you under the Apache License, Version 2.0 (the
6+
# "License"); you may not use this file except in compliance
7+
# with the License. You may obtain a copy of the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing,
12+
# software distributed under the License is distributed on an
13+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
14+
# KIND, either express or implied. See the License for the
15+
# specific language governing permissions and limitations
16+
# under the License.
17+
18+
name: CodSpeed
19+
20+
concurrency:
21+
group: ${{ github.repository }}-${{ github.head_ref || github.sha }}-${{ github.workflow }}
22+
cancel-in-progress: true
23+
24+
on:
25+
push:
26+
branches-ignore:
27+
- 'gh-readonly-queue/**'
28+
paths-ignore:
29+
- "docs/**"
30+
- "**.md"
31+
- ".github/ISSUE_TEMPLATE/**"
32+
- ".github/pull_request_template.md"
33+
pull_request:
34+
paths-ignore:
35+
- "docs/**"
36+
- "**.md"
37+
- ".github/ISSUE_TEMPLATE/**"
38+
- ".github/pull_request_template.md"
39+
merge_group:
40+
# manual trigger
41+
# https://docs.github.com/en/actions/managing-workflow-runs/manually-running-a-workflow
42+
workflow_dispatch:
43+
44+
jobs:
45+
cargo_bench:
46+
name: cargo bench benchmarks
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Cleanup image
50+
run: |
51+
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
52+
sudo docker image prune --all --force
53+
sudo docker builder prune -a
54+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
55+
- name: Rust Dependency Cache
56+
uses: Swatinem/rust-cache@779680da715d629ac1d338a641029a2f4372abb5 # v2.8.2
57+
with:
58+
shared-key: "amd-ci-codpseed"
59+
save-if: ${{ github.ref_name == 'main' }}
60+
- name: Setup codspeed
61+
run: cargo install cargo-codspeed
62+
- name: Download benchmark data
63+
run: benchmarks/bench.sh data clickbench_partitioned
64+
- name: Install codpseed-criterion-compat
65+
working-directory: datafusion/core
66+
run: cargo add --dev --rename criterion --features async_tokio,async_futures [email protected]
67+
- name: Build the benchmark targets
68+
working-directory: datafusion/core
69+
run: cargo codspeed build -j 2 --profile release-nonlto --bench sql_planner
70+
- name: Run the benchmarks
71+
uses: CodSpeedHQ/action@972e3437949c89e1357ebd1a2dbc852fcbc57245 # v4.5.1
72+
with:
73+
mode: simulation
74+
working-directory: datafusion/core
75+
run: cargo codspeed run

0 commit comments

Comments
 (0)