From a8871bf2d0679e255b35c40ff90de08dcc9e7548 Mon Sep 17 00:00:00 2001 From: Xavier Coulon Date: Sat, 2 Apr 2022 12:27:14 +0200 Subject: [PATCH] fix path to benchstat Signed-off-by: Xavier Coulon --- make/bench.mk | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/make/bench.mk b/make/bench.mk index 04d11df6..1eaff4a9 100644 --- a/make/bench.mk +++ b/make/bench.mk @@ -1,5 +1,8 @@ REPORTS_DIR=./tmp/bench/reports -BENCH_COUNT=10 +BENCH_COUNT ?= 10 + +# Detecting GOPATH and removing trailing "/" if any +GOPATH = $(realpath $(shell go env GOPATH)) .PHONY: bench ## run the top-level benchmarks @@ -31,10 +34,10 @@ bench-diff: clean generate-optimized check-git-status @git checkout $(GIT_BRANCH_NAME) @echo "" @echo "Comparing with 'master' branch" - @benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/master.bench + @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/master.bench @echo "" @echo "Comparing with 'v0.7.0' tag" - @benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/v0.7.0.bench + @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/v0.7.0.bench check-git-status: ifneq ("$(shell git status --porcelain)","")