1
0
mirror of https://github.com/open-telemetry/opentelemetry-go.git synced 2026-06-03 18:35:08 +02:00

Test benchmarks in precommit (#1207)

* Fix the metric SDK benchmarks

* Test the benchmarks in precommit
This commit is contained in:
Joshua MacDonald
2020-09-25 13:27:03 -07:00
committed by GitHub
parent 0b348c345f
commit 3a9f5fe15f
2 changed files with 30 additions and 23 deletions
+8 -1
View File
@@ -57,7 +57,7 @@ $(TOOLS_DIR)/gojq: $(TOOLS_MOD_DIR)/go.mod $(TOOLS_MOD_DIR)/go.sum $(TOOLS_MOD_D
cd $(TOOLS_MOD_DIR) && \
go build -o $(TOOLS_DIR)/gojq github.com/itchyny/gojq/cmd/gojq
precommit: dependabot-check license-check generate build lint examples test
precommit: dependabot-check license-check generate build lint examples test-benchmarks test
.PHONY: test-with-coverage
test-with-coverage:
@@ -124,6 +124,13 @@ examples:
go build .); \
done
.PHONY: test-benchmarks
test-benchmarks:
@set -e; for dir in $(ALL_GO_MOD_DIRS); do \
echo "test benchmarks in $${dir}"; \
(cd "$${dir}" && go test -test.benchtime=1ms -run=NONE -bench=. ./...) > /dev/null; \
done
.PHONY: lint
lint: $(TOOLS_DIR)/golangci-lint $(TOOLS_DIR)/misspell
set -e; for dir in $(ALL_GO_MOD_DIRS); do \