Skip to content

Commit

Permalink
Stable benchmarks (#120)
Browse files Browse the repository at this point in the history
  • Loading branch information
marco6 authored Jul 9, 2024
1 parent 69db51f commit 092e35e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
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

0 comments on commit 092e35e

Please sign in to comment.