Skip to content
Closed
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
2 changes: 2 additions & 0 deletions cmd/terramate/e2etests/core/main_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ import (
)

func TestMain(m *testing.M) {
// TODO: line added for triggering bench in CI.

packageDir, err := os.Getwd()
if err != nil {
log.Printf("failed to get test working directory: %v", err)
Expand Down
8 changes: 4 additions & 4 deletions makefiles/common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ GO_RELEASER_VERSION=v1.14.0
GOLANGCI_LINT_VERSION ?= v1.52.2
COVERAGE_REPORT ?= coverage.txt
RUN_ADD_LICENSE=go run github.com/google/addlicense@v1.0.0 -l mpl -s=only -ignore 'docs/**'
BENCH_CHECK=go run github.com/madlambda/benchcheck/cmd/benchcheck@743137fbfd827958b25ab6b13fa1180e0e933eb1
BENCH_CHECK=go run github.com/madlambda/benchcheck/cmd/benchcheck@customize-bench-runner

## Build terramate tools into bin directory
.PHONY: build
Expand Down Expand Up @@ -129,10 +129,10 @@ bench/check: pkg?=./...
bench/check: old?=main
bench/check: new?=$(shell git rev-parse HEAD)
bench/check:
@$(BENCH_CHECK) -mod $(name) -pkg $(pkg) -go-test-flags "-benchmem,-count=20,-run=Bench" \
-old $(old) -new $(new) \
$(BENCH_CHECK) -mod $(name) -old $(old) -new $(new) \
-check allocs/op=$(allocdelta) \
-check time/op=$(timedelta)
-check time/op=$(timedelta) \
go test -benchmem -count=20 -run=Bench -bench=. $(pkg)

## cleanup artifacts produced by the benchmarking process
bench/cleanup:
Expand Down