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

Commit f513b8c

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

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/tpch.yaml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
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+
name: Run Rust benchmark example
20+
runs-on: ubuntu-latest
21+
steps:
22+
# Setup Rust.
23+
- uses: actions/checkout@v4
24+
- run: rustup toolchain update stable && rustup default stable
25+
# Make sure to use the
26+
- uses: Swatinem/rust-cache@v2
27+
with:
28+
workspaces: optd-sqlplannertest
29+
# Run the benchmark and store to `results/tpch.txt`.
30+
- name: Run benchmark
31+
# (REMOVE) run everything instead of just q6
32+
run: cargo bench --bench planner_bench tpch/q6/ | tee results/tpch.txt
33+
# Download the previous benchmark result from the cache (if it exists).
34+
- name: Download previous benchmark data
35+
uses: actions/cache@v4
36+
with:
37+
path: ./cache
38+
key: ${{ runner.os }}-benchmark
39+
# Run the `github-action-benchmark` action.
40+
- name: Store benchmark result
41+
uses: benchmark-action/github-action-benchmark@v1
42+
with:
43+
name: Rust Benchmark
44+
tool: 'cargo'
45+
output-file-path: results/tpch.txt
46+
gh-pages-branch: gh-pages
47+
external-data-json-path: cache/benchmark-data.json
48+
github-token: ${{ secrets.GITHUB_TOKEN }}
49+
auto-push: true
50+
# Show alert with commit comment on detecting possible performance regression
51+
alert-threshold: '125%'
52+
summary-always: true
53+
comment-on-alert: true
54+
fail-on-alert: true
55+
alert-comment-cc-users: '@connortsui20'
56+
57+
# - name: Store benchmark result - separate results repo
58+
# uses: benchmark-action/github-action-benchmark@v1
59+
# with:
60+
# name: Rust Benchmark
61+
# tool: 'cargo'
62+
# output-file-path: results/tpch.txt
63+
# github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
64+
# auto-push: true
65+
# # Show alert with commit comment on detecting possible performance regression
66+
# alert-threshold: '200%'
67+
# summary-always: true
68+
# comment-on-alert: true
69+
# fail-on-alert: true
70+
# alert-comment-cc-users: '@connortsui20'
71+
# gh-repository: 'github.com/???'

0 commit comments

Comments
 (0)