Add convenient benchmark Makefile rule

This commit is contained in:
Cassondra Foesch 2021-03-17 14:57:00 +00:00
parent b22b9e472e
commit 325cdac782
1 changed files with 7 additions and 0 deletions

View File

@ -1,3 +1,5 @@
.PHONY: integration integration_w_race benchmark
integration: integration:
go test -integration -v ./... go test -integration -v ./...
go test -testserver -v ./... go test -testserver -v ./...
@ -14,4 +16,9 @@ integration_w_race:
go test -race -testserver -allocator -v ./... go test -race -testserver -allocator -v ./...
go test -race -integration -allocator -testserver -v ./... go test -race -integration -allocator -testserver -v ./...
COUNT ?= 1
BENCHMARK_PATTERN ?= "."
benchmark:
go test -integration -run=NONE -bench=$(BENCHMARK_PATTERN) -benchmem -memprofile memprofile.out -count=$(COUNT)
go tool pprof -svg -output=memprofile.svg memprofile.out