Skip to content

refactor(create): transition builder type on OnConflict to prevent nested conflict clauses in bulk operations #66

refactor(create): transition builder type on OnConflict to prevent nested conflict clauses in bulk operations

refactor(create): transition builder type on OnConflict to prevent nested conflict clauses in bulk operations #66

Workflow file for this run

name: Benchmark
on:
push:
branches: [ "main", "master" ]
pull_request:
branches: [ "main", "master" ]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
benchmark:
name: Benchmark (${{ matrix.db }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
db: [sqlite, postgres]
services:
postgres:
image: postgres:16
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: bench
POSTGRES_INITDB_ARGS: --nosync
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
--tmpfs /var/lib/postgresql/data:rw,noatime,size=1024m
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: benchmark/go.mod
cache-dependency-path: benchmark/go.sum
- name: Build Phi CLI
run: go build -o bin/phi
- name: Run Benchmark (${{ matrix.db }})
run: |
cd benchmark
if [ "${{ matrix.db }}" = "postgres" ]; then
make bench/pg
else
make bench/sqlite
fi | tee ../bench-${{ matrix.db }}.txt
env:
DATABASE_URL: postgres://postgres:postgres@localhost:5432/bench?sslmode=disable
DATABASE_DIRECT_URL: postgres://postgres:postgres@localhost:5432/bench?sslmode=disable
SKIP_DB_RESET: true
- uses: actions/upload-artifact@v4
with:
name: bench-${{ matrix.db }}-${{ github.sha }}
path: bench-${{ matrix.db }}.txt