mirror of
https://github.com/foomo/contentserver.git
synced 2025-10-16 12:25:44 +00:00
updated makefile targets for profiling
This commit is contained in:
parent
3985784579
commit
63640b24b2
4
.gitignore
vendored
4
.gitignore
vendored
@ -1,5 +1,5 @@
|
|||||||
http.test
|
*.test
|
||||||
cprof
|
cprof-*
|
||||||
var
|
var
|
||||||
.*
|
.*
|
||||||
*~
|
*~
|
||||||
|
|||||||
29
Makefile
29
Makefile
@ -24,8 +24,8 @@ build-docker: clean build-arch
|
|||||||
|
|
||||||
package: build
|
package: build
|
||||||
pkg/build.sh
|
pkg/build.sh
|
||||||
test:
|
|
||||||
go test ./...
|
# docker
|
||||||
|
|
||||||
docker-build:
|
docker-build:
|
||||||
docker build -t $(IMAGE):$(TAG) .
|
docker build -t $(IMAGE):$(TAG) .
|
||||||
@ -33,6 +33,25 @@ docker-build:
|
|||||||
docker-push:
|
docker-push:
|
||||||
docker push $(IMAGE):$(TAG)
|
docker push $(IMAGE):$(TAG)
|
||||||
|
|
||||||
profile-test:
|
# testing / benchmarks
|
||||||
go test -run=none -bench=ClientServerParallel4 -cpuprofile=cprof net/http
|
|
||||||
go tool pprof --text http.test cprof
|
test:
|
||||||
|
go test ./...
|
||||||
|
|
||||||
|
bench:
|
||||||
|
go test -run=none -bench=. ./...
|
||||||
|
|
||||||
|
# profiling
|
||||||
|
|
||||||
|
test-cpu-profile:
|
||||||
|
go test -cpuprofile=cprof-client github.com/foomo/contentserver/client
|
||||||
|
go tool pprof --text client.test cprof-client
|
||||||
|
|
||||||
|
go test -cpuprofile=cprof-repo github.com/foomo/contentserver/repo
|
||||||
|
go tool pprof --text repo.test cprof-repo
|
||||||
|
|
||||||
|
test-gctrace:
|
||||||
|
GODEBUG=gctrace=1 go test ./...
|
||||||
|
|
||||||
|
test-malloctrace:
|
||||||
|
GODEBUG=allocfreetrace=1 go test ./...
|
||||||
Loading…
Reference in New Issue
Block a user