Skip to content

chore: add rule and test (#851) #368

chore: add rule and test (#851)

chore: add rule and test (#851) #368

Workflow file for this run

name: Benchmark
on:
push:
branches:
- main
pull_request:
branches:
- main
env:
CARGO_TERM_COLOR: always
CACHE_KEY_SUFFIX: v20220409
PROTOC_NO_VENDOR: 1
permissions:
contents: write
deployments: write
jobs:
benchmark:
name: Run benchmark
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: arduino/setup-protoc@v1
with:
version: "3.x"
repo-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}-${{ env.CACHE_KEY_SUFFIX }}
- name: Generate TPC-H 1GB dataset
run: make tpch
- name: Run benchmark
run: cargo bench --bench tpch -- --output-format bencher | tee output.txt
- name: Store benchmark result
if: github.event_name != 'pull_request'
uses: benchmark-action/github-action-benchmark@v1
with:
name: Rust Benchmark
tool: 'cargo'
output-file-path: output.txt
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true
# Show alert with commit comment on detecting possible performance regression
alert-threshold: '200%'
comment-on-alert: true
fail-on-alert: true
alert-comment-cc-users: '@wangrunji0408,@skyzh'