Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stable benchmarks #120

Merged
merged 2 commits into from
Jul 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion .github/workflows/go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches: [master]
pull_request:

env:
BENCH_COUNT: 7

jobs:
code-quality:
name: Code Quality
Expand Down Expand Up @@ -73,8 +76,14 @@ jobs:
- name: go mod download
run: go mod download

- name: Install Dqlite
run: |
sudo add-apt-repository -y ppa:dqlite/dev
sudo apt install libdqlite-dev

- name: Run benchmarks
run: make go.bench
run: |
go test -tags libsqlite3 -v -p 1 ./... -run "^$$" -bench . -benchmem -count $BENCH_COUNT

build:
name: Build k8s-dqlite
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
DQLITE_BUILD_SCRIPTS_DIR ?= $(shell pwd)/hack
GO_SOURCES = $(shell find . -name '*.go')
BENCH_COUNT ?= 7

## Development
go.fmt:
Expand All @@ -13,7 +14,7 @@ go.test:
$(DQLITE_BUILD_SCRIPTS_DIR)/static-go-test.sh -v -p 1 ./...

go.bench:
$(DQLITE_BUILD_SCRIPTS_DIR)/static-go-test.sh -v -p 1 ./... -run "^$$" -bench "Benchmark" -benchmem
$(DQLITE_BUILD_SCRIPTS_DIR)/static-go-test.sh -v -p 1 ./... -run "^$$" -bench "Benchmark" -benchmem -count $(BENCH_COUNT)

## Static Builds
static: bin/static/k8s-dqlite bin/static/dqlite
Expand Down
Loading