Skip to content
This repository was archived by the owner on Jan 7, 2025. It is now read-only.

Commit b642944

Browse files
committed
add tpch benchmark workflow
1 parent b4b1aea commit b642944

File tree

1 file changed

+65
-0
lines changed

1 file changed

+65
-0
lines changed

.github/workflows/tpch.yaml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Rust TPC-H Benchmarks
2+
3+
# Do not run this workflow on pull request since this workflow has permission to modify contents.
4+
on:
5+
push:
6+
branches:
7+
- master
8+
# Hack for testing (REMOVE)
9+
- continuous-bench-attempt
10+
11+
permissions:
12+
# deployments permission to deploy GitHub pages website
13+
deployments: write
14+
# contents permission to update benchmark contents in gh-pages branch
15+
contents: write
16+
17+
jobs:
18+
benchmark:
19+
20+
# Make sure an error doesn't mean we waste everything that has been compiled.
21+
continue-on-error: true
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest]
26+
27+
name: Run Rust benchmark example
28+
runs-on: ${{ matrix.os }}
29+
steps:
30+
# Setup Rust.
31+
- uses: actions/checkout@v4
32+
- run: rustup toolchain install stable --profile minimal --no-self-update
33+
34+
# Make sure to use cached compilation objects if they exist.
35+
- uses: Swatinem/rust-cache@v2
36+
37+
# Run the benchmark and store to `results/tpch.txt`.
38+
- name: Run benchmark
39+
# (REMOVE) run everything instead of just q6
40+
run: cargo bench --bench planner_bench tpch/q6/execution | tee results/tpch.txt
41+
42+
# Download the previous benchmark result from the cache (if it exists).
43+
- name: Download previous benchmark data
44+
uses: actions/cache@v4
45+
with:
46+
path: ./cache
47+
key: ${{ runner.os }}-benchmark
48+
49+
# Run the `github-action-benchmark` action.
50+
- name: Store benchmark result
51+
uses: benchmark-action/github-action-benchmark@v1
52+
with:
53+
name: Rust Benchmark
54+
tool: 'cargo'
55+
output-file-path: results/tpch.txt
56+
gh-pages-branch: gh-pages
57+
external-data-json-path: cache/benchmark-data.json
58+
github-token: ${{ secrets.GITHUB_TOKEN }}
59+
auto-push: true
60+
# Show alert with commit comment on detecting possible performance regression
61+
alert-threshold: '125%'
62+
summary-always: true
63+
comment-on-alert: true
64+
fail-on-alert: true
65+
alert-comment-cc-users: '@connortsui20'

0 commit comments

Comments
 (0)