Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add tpch benchmark workflow #269

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ jobs:
with:
profile: minimal
components: rustfmt, clippy
# Make sure to use cached compilation objects if they exist.
- uses: Swatinem/rust-cache@v2
- name: Check code format
uses: actions-rs/cargo@v1
with:
Expand Down
51 changes: 51 additions & 0 deletions .github/workflows/tpch.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Rust TPC-H Benchmarks

# Do NOT run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- main
- 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:
name: Run Rust benchmark example
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Setup Rust.
- 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 the result in `output.txt`.
- name: Run benchmark
run: cargo bench --bench planner_bench tpch/ -- --output-format bencher | tee output.txt

# Run the `github-action-benchmark` action.
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: TPC-H Planning and Execution Benchmark
tool: "cargo"
output-file-path: output.txt
gh-pages-branch: gh-pages
github-token: ${{ secrets.GITHUB_TOKEN }}
# Automatically push the results to the GitHub pages branch.
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"
# Push to dedicated benchmark result repository.
# gh-repository: "github.com/cmu-db/optd-benchmark" # TODO NOT WORKING
8 changes: 4 additions & 4 deletions optd-core/src/cascades/optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ impl<T: NodeType, M: Memo<T>> CascadesOptimizer<T, M> {
let plan_space = self.memo.estimated_plan_space();
if let Some(partial_explore_space) = self.prop.partial_explore_space {
if plan_space - plan_space_begin > partial_explore_space {
println!(
"plan space size budget used, not applying logical rules any more. current plan space: {}",
plan_space
);
// println!(
// "plan space size budget used, not applying logical rules any more. current plan space: {}",
// plan_space
// );
self.ctx.budget_used = true;
if self.prop.panic_on_budget {
panic!("plan space size budget used");
Expand Down
Loading