From 85aa8fc83fc00ac1078987b198eb4de1e08241aa Mon Sep 17 00:00:00 2001 From: Xavier Coulon Date: Mon, 18 Apr 2022 22:18:39 +0200 Subject: [PATCH] use GITHUB_SHA Signed-off-by: Xavier Coulon --- make/bench.mk | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/make/bench.mk b/make/bench.mk index 2839552d..10bca942 100644 --- a/make/bench.mk +++ b/make/bench.mk @@ -11,8 +11,8 @@ bench: clean generate-optimized @mkdir -p $(REPORTS_DIR) @go test -tags bench -bench=. -benchmem -count=$(BENCH_COUNT) -run=XXX \ github.com/bytesparadise/libasciidoc \ - | tee $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench - @echo "generated $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench" + | tee $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench + @echo "generated $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench" .PHONY: bench-diff ## run the top-level benchmarks and compares with results of 'master' and 'v0.7.0' @@ -21,8 +21,8 @@ bench-diff: clean generate-optimized check-git-status @mkdir -p $(REPORTS_DIR) @go test -tags bench -bench=. -benchmem -count=$(BENCH_COUNT) -run=XXX \ github.com/bytesparadise/libasciidoc \ - | tee $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench - @echo "generated $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench" + | tee $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench + @echo "generated $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench" @git checkout master @go test -tags bench -bench=. -benchmem -count=$(BENCH_COUNT) -run=XXX \ github.com/bytesparadise/libasciidoc \ @@ -33,13 +33,13 @@ bench-diff: clean generate-optimized check-git-status github.com/bytesparadise/libasciidoc \ | tee $(REPORTS_DIR)/v0.7.0.bench @echo "generated $(REPORTS_DIR)/v0.7.0.bench" - @git checkout $(GIT_BRANCH_NAME) - @echo "HEAD is now at $(git rev-parse --abbrev-ref HEAD) (expecting $(GIT_BRANCH_NAME))" + @git checkout $(GITHUB_SHA) + @echo "HEAD is now at $(git rev-parse --abbrev-ref HEAD) (expecting $(GITHUB_SHA))" @echo "Comparing with 'master' branch" - @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/master.bench + @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/master.bench @echo "" @echo "Comparing with 'v0.7.0' tag" - @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GIT_BRANCH_NAME)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/v0.7.0.bench | tee $(REPORTS_DIR)/diffs.txt + @$(GOPATH)/bin/benchstat $(REPORTS_DIR)/$(GITHUB_SHA)-$(GIT_COMMIT_ID_SHORT).bench $(REPORTS_DIR)/v0.7.0.bench | tee $(REPORTS_DIR)/diffs.txt .PHONY: print-bench-diff print-bench-diff: