bench: pushdown_compare
& canonicalize_compare
for fsst (#2269)
#1584
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
name: Benchmarks | |
on: | |
push: | |
branches: [ develop ] | |
permissions: | |
id-token: write # enables AWS-GitHub OIDC | |
actions: read | |
contents: write | |
deployments: write | |
jobs: | |
commit-metadata: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::375504701696:role/GitHubBenchmarkRole | |
aws-region: us-east-1 | |
- name: Upload Commit Metadata | |
shell: bash | |
run: | | |
set -Eeu -o pipefail -x | |
sudo apt-get update && sudo apt-get install -y jq | |
bash scripts/commit-json.sh > new-commit.json | |
bash scripts/cat-s3.sh vortex-benchmark-results-database commits.json new-commit.json | |
codspeed_bench: | |
name: Run Criterion benchmarks with Codspeed | |
env: | |
BENCH_TARGETS: > | |
dict_compare | |
dict_compress | |
bitpacking_take | |
run_end_filter | |
run_end_null_count | |
search_sorted | |
scalar_subtract | |
compare | |
take_strings | |
take_patches | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/cleanup | |
- uses: ./.github/actions/setup-rust | |
- name: Install Codspeed | |
shell: bash | |
run: cargo install --force cargo-codspeed --locked | |
- name: Build benchmark targets | |
env: | |
RUSTFLAGS: "-C target-cpu=native" | |
# The profile needs to be set explicitly to bench | |
# as codspeed by default compiles with the release profile. | |
run: cargo codspeed build --profile bench $BENCH_TARGETS | |
- name: Run the benchmarks | |
uses: CodSpeedHQ/action@v3 | |
with: | |
run: cargo codspeed run $BENCH_TARGETS | |
token: ${{ secrets.CODSPEED_TOKEN }} | |
bench: | |
strategy: | |
matrix: | |
benchmark: | |
- id: random_access | |
name: Random Access | |
- id: compress | |
name: Vortex Compression | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/cleanup | |
- uses: ./.github/actions/setup-rust | |
# The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet | |
- name: Install DuckDB | |
uses: opt-nc/setup-duckdb-action@v1.0.10 | |
if: runner.environment != 'self-hosted' | |
with: | |
version: v1.0.0 | |
- name: Set tempdir | |
if: runner.environment == 'self-hosted' | |
run: | | |
echo "TMPDIR=/work" >> $GITHUB_ENV | |
- name: Run benchmark | |
shell: bash | |
env: | |
BENCH_VORTEX_RATIOS: '.*' | |
RUSTFLAGS: '-C target-cpu=native' | |
run: | | |
cargo install cargo-criterion | |
sudo apt-get update && sudo apt-get install -y jq | |
cargo criterion \ | |
--bench ${{ matrix.benchmark.id }} \ | |
--features mimalloc \ | |
--message-format=json \ | |
> ${{ matrix.benchmark.id }}-raw.json | |
cat ${{ matrix.benchmark.id }}-raw.json \ | |
| bash scripts/coerce-criterion-json.sh \ | |
> ${{ matrix.benchmark.id }}.json | |
- name: Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::375504701696:role/GitHubBenchmarkRole | |
aws-region: us-east-1 | |
- name: Upload Benchmark Results | |
shell: bash | |
run: | | |
bash scripts/cat-s3.sh vortex-benchmark-results-database data.json ${{ matrix.benchmark.id }}.json | |
tpch: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/cleanup | |
- uses: ./.github/actions/setup-rust | |
# The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet | |
- name: Install DuckDB | |
uses: opt-nc/setup-duckdb-action@v1.0.10 | |
if: runner.environment != 'self-hosted' | |
with: | |
version: v1.0.0 | |
- name: Set tempdir | |
if: runner.environment == 'self-hosted' | |
run: | | |
echo "TMPDIR=/work" >> $GITHUB_ENV | |
- name: Run TPC-H benchmark | |
shell: bash | |
env: | |
BENCH_VORTEX_RATIOS: '.*' | |
RUSTFLAGS: '-C target-cpu=native' | |
run: | | |
cargo run --bin tpch_benchmark --release -- -d gh-json -t 1 | tee tpch.json | |
- name: Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::375504701696:role/GitHubBenchmarkRole | |
aws-region: us-east-1 | |
- name: Upload Benchmark Results | |
shell: bash | |
run: | | |
bash scripts/cat-s3.sh vortex-benchmark-results-database data.json tpch.json | |
clickbench: | |
runs-on: self-hosted | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ./.github/actions/cleanup | |
- uses: ./.github/actions/setup-rust | |
# The compression benchmarks rely on DuckDB being installed to convert CSV to Parquet | |
- name: Install DuckDB | |
uses: opt-nc/setup-duckdb-action@v1.0.10 | |
if: runner.environment != 'self-hosted' | |
with: | |
version: v1.0.0 | |
- name: Set tempdir | |
if: runner.environment == 'self-hosted' | |
run: | | |
echo "TMPDIR=/work" >> $GITHUB_ENV | |
- name: Run Clickbench benchmark | |
shell: bash | |
env: | |
BENCH_VORTEX_RATIOS: '.*' | |
RUSTFLAGS: '-C target-cpu=native' | |
HOME: /home/ci-runner | |
run: | | |
cargo run --bin clickbench --release -- -d gh-json | tee clickbench.json | |
- name: Setup AWS CLI | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::375504701696:role/GitHubBenchmarkRole | |
aws-region: us-east-1 | |
- name: Upload Benchmark Results | |
shell: bash | |
run: | | |
bash scripts/cat-s3.sh vortex-benchmark-results-database data.json clickbench.json |