mirror of https://github.com/pkg/sftp.git
Add convenient benchmark Makefile rule
This commit is contained in:
parent
b22b9e472e
commit
325cdac782
7
Makefile
7
Makefile
|
@ -1,3 +1,5 @@
|
|||
.PHONY: integration integration_w_race benchmark
|
||||
|
||||
integration:
|
||||
go test -integration -v ./...
|
||||
go test -testserver -v ./...
|
||||
|
@ -14,4 +16,9 @@ integration_w_race:
|
|||
go test -race -testserver -allocator -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
|
||||
|
|
Loading…
Reference in New Issue