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

Commit 0a363f4

Browse files
committed
add tpch benchmark workflow
1 parent b4b1aea commit 0a363f4

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/tpch.yaml

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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
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 nightly && rustup default nightly
25+
# Run the benchmark and store to `results/tpch.txt`.
26+
- name: Run benchmark
27+
run: cargo +nightly bench --bench planner_bench tpch/ | tee results/tpch.txt
28+
# Download the previous benchmark result from the cache (if it exists).
29+
- name: Download previous benchmark data
30+
uses: actions/cache@v4
31+
with:
32+
path: ./cache
33+
key: ${{ runner.os }}-benchmark
34+
# Run the `github-action-benchmark` action.
35+
- name: Store benchmark result
36+
uses: benchmark-action/github-action-benchmark@v1
37+
with:
38+
name: Rust Benchmark
39+
tool: 'cargo'
40+
output-file-path: results/tpch.txt
41+
gh-pages-branch: gh-pages
42+
external-data-json-path: cache/benchmark-data.json
43+
github-token: ${{ secrets.GITHUB_TOKEN }}
44+
auto-push: true
45+
# Show alert with commit comment on detecting possible performance regression
46+
alert-threshold: '125%'
47+
summary-always: true
48+
comment-on-alert: true
49+
fail-on-alert: true
50+
alert-comment-cc-users: '@connortsui20'
51+
52+
# - name: Store benchmark result - separate results repo
53+
# uses: benchmark-action/github-action-benchmark@v1
54+
# with:
55+
# name: Rust Benchmark
56+
# tool: 'cargo'
57+
# output-file-path: results/tpch.txt
58+
# github-token: ${{ secrets.BENCHMARK_ACTION_BOT_TOKEN }}
59+
# auto-push: true
60+
# # Show alert with commit comment on detecting possible performance regression
61+
# alert-threshold: '200%'
62+
# summary-always: true
63+
# comment-on-alert: true
64+
# fail-on-alert: true
65+
# alert-comment-cc-users: '@connortsui20'
66+
# gh-repository: 'github.com/???'

0 commit comments

Comments
 (0)