Skip to content

Implment infallible conversion for ApiError #681

Implment infallible conversion for ApiError

Implment infallible conversion for ApiError #681

Workflow file for this run

name: Benchmarks
on: [push]
jobs:
microbenchmarks:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
# postgres: # Not needed yet, this suite doesn't support postgres.
# image: postgres
# env:
# POSTGRES_PASSWORD: postgres
# options: >-
# --health-cmd pg_isready
# --health-interval 10s
# --health-timeout 5s
# --health-retries 5
# ports:
# - 5432:5432
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
-
name: Free disk space
run: |
sudo docker rmi $(docker image ls -aq) || true
sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc || true
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Run benchmarks
run: |
cargo bench --bench suite --features sqlite,redis,compression
env:
COMMERCE_POSTGRESQL_URL: postgres://postgres:postgres@localhost/postgres
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v3
with:
name: microbenchmarks
path: target/criterion
commerce:
runs-on: ubuntu-latest
services:
redis:
image: redis
options: >-
--health-cmd "redis-cli ping"
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 6379:6379
postgres:
image: postgres
env:
POSTGRES_PASSWORD: postgres
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
timeout-minutes: 60
steps:
- uses: actions/checkout@v3
- name: Install Rust
uses: hecrj/setup-rust-action@v1
- name: Run benchmarks
run: |
cargo bench --bench commerce --features postgresql,compression -- --suite -n1000
env:
COMMERCE_POSTGRESQL_URL: postgres://postgres:postgres@localhost/postgres
RUST_BACKTRACE: 1
- uses: actions/upload-artifact@v3
with:
name: commerce
path: benchmarks/commerce-bench
deploy:
runs-on: ubuntu-latest
timeout-minutes: 60
if: github.ref == 'refs/heads/main' || github.ref == 'refs/heads/release' || startsWith(github.ref, 'refs/tags/')
needs: [commerce, microbenchmarks]
steps:
- uses: actions/checkout@v3
- uses: actions/download-artifact@v3
- name: Gather artifacts
run: |
mkdir reports
mv commerce reports/
mv microbenchmarks reports/suite
- name: Deploy
uses: khonsulabs/sync-to-dossier@main
with:
url: ${{ secrets.DOSSIER_URL }}
api-key-id: ${{ secrets.DOSSIER_API_KEY_ID }}
api-key: ${{ secrets.DOSSIER_API_KEY }}
project: bonsaidb
from: reports
to: /${{ github.ref_name }}/benchmarks