Skip to content

types: extract SurrealTypes submodule #48

types: extract SurrealTypes submodule

types: extract SurrealTypes submodule #48

Workflow file for this run

name: Benchmark
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
bench:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: julia-actions/setup-julia@v2
with:
version: '1'
- uses: julia-actions/cache@v2
- uses: julia-actions/julia-buildpkg@v1
- name: Start SurrealDB
run: |
docker run -d -p 8000:8000 \
--name surrealdb \
surrealdb/surrealdb:latest \
start --user root --pass root memory
- name: Wait for SurrealDB
run: |
for i in $(seq 1 30); do
curl -s -X POST http://localhost:8000/rpc \
-H "Content-Type: application/json" \
-d '{"id":1,"method":"version","params":[]}' && break
sleep 1
done
# The bench script exits 1 if any case exceeds 2x the Go reference.
# That's the hard regression gate. Output is also archived so trends
# can be inspected manually across runs.
- name: Run benchmarks (human-readable)
run: julia --project=. test/bench_basic.jl
env:
SURREALDB_URL: ws://localhost:8000
BENCH_ITER: 500
- name: Run benchmarks (JSON for archival)
if: always()
run: julia --project=. test/bench_basic.jl --json > bench_results.json
env:
SURREALDB_URL: ws://localhost:8000
BENCH_ITER: 500
- name: Upload bench artifact
if: always()
uses: actions/upload-artifact@v4
with:
name: bench-results-${{ github.run_id }}
path: bench_results.json
retention-days: 30