Skip to content

Daily benchmark

Daily benchmark #1142

name: Daily benchmark
on:
schedule:
- cron: "0 12 * * *"
jobs:
benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Setup dependencies
run: |
sudo add-apt-repository ppa:dqlite/dev -y
sudo apt update
sudo apt install -y libsqlite3-dev libuv1-dev liblz4-dev libraft-dev libdqlite-dev
- name: Build & Benchmark
env:
GO_DQLITE_MULTITHREAD: 1
run: |
go get -t -tags libsqlite3 ./...
go install -tags libsqlite3 github.com/canonical/go-dqlite/v3/cmd/dqlite-benchmark
dqlite-benchmark --db 127.0.0.1:9001 --duration 3600 --driver --cluster 127.0.0.1:9001,127.0.0.1:9002,127.0.0.1:9003 --workload kvreadwrite &
masterpid=$!
dqlite-benchmark --db 127.0.0.1:9002 --join 127.0.0.1:9001 &
dqlite-benchmark --db 127.0.0.1:9003 --join 127.0.0.1:9001 &
wait $masterpid
echo "Write results:"
head -n 5 /tmp/dqlite-benchmark/127.0.0.1:9001/results/0-exec-*
echo ""
echo "Read results:"
head -n 5 /tmp/dqlite-benchmark/127.0.0.1:9001/results/0-query-*
- uses: actions/upload-artifact@v3
with:
name: dqlite-daily-benchmark
path: /tmp/dqlite-benchmark/127.0.0.1:9001/results/*