-
Notifications
You must be signed in to change notification settings - Fork 214
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci): add benchmark workflow (#845)
This PR adds a benchmark workflow to CI. It will run TPC-H bench for each commit on main branch and show the result in charts ([example](https://risingwavelabs.github.io/arrow-udf/dev/bench/)). Signed-off-by: Runji Wang <wangrunji0408@163.com>
- Loading branch information
1 parent
c4252aa
commit fd5fe40
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: Benchmark | ||
on: | ||
push: | ||
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: 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: Run benchmark | ||
run: cargo bench --bench tpch -- --output-format bencher | tee output.txt | ||
- name: Store benchmark result | ||
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' |