Skip to content

Commit

Permalink
add tpch benchmark workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
connortsui20 committed Dec 18, 2024
1 parent b4b1aea commit b642944
Showing 1 changed file with 65 additions and 0 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/tpch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Rust TPC-H Benchmarks

# Do not run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- master
# Hack for testing (REMOVE)
- continuous-bench-attempt

permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write

jobs:
benchmark:

# Make sure an error doesn't mean we waste everything that has been compiled.
continue-on-error: true
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]

name: Run Rust benchmark example
runs-on: ${{ matrix.os }}
steps:
# Setup Rust.
- uses: actions/checkout@v4
- run: rustup toolchain install stable --profile minimal --no-self-update

# Make sure to use cached compilation objects if they exist.
- uses: Swatinem/rust-cache@v2

# Run the benchmark and store to `results/tpch.txt`.
- name: Run benchmark
# (REMOVE) run everything instead of just q6
run: cargo bench --bench planner_bench tpch/q6/execution | tee results/tpch.txt

# Download the previous benchmark result from the cache (if it exists).
- name: Download previous benchmark data
uses: actions/cache@v4
with:
path: ./cache
key: ${{ runner.os }}-benchmark

# Run the `github-action-benchmark` action.
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: results/tpch.txt
gh-pages-branch: gh-pages
external-data-json-path: cache/benchmark-data.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '125%'
summary-always: true
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@connortsui20'

0 comments on commit b642944

Please sign in to comment.