cli: add -prof flag

This commit is contained in:
z7zmey
2018-06-21 20:37:34 +03:00
parent 09c984ebdb
commit ca5c3bbfff
4 changed files with 17 additions and 6 deletions

View File

@@ -36,12 +36,12 @@ compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go
goyacc -o $@ $<
cpu_pprof:
GOGC=off go test -cpuprofile cpu.prof -bench=. -benchtime=20s ./php7
go tool pprof ./php7.test cpu.prof
GOGC=off go test -cpuprofile cpu.pprof -bench=. -benchtime=20s ./php7
go tool pprof ./php7.test cpu.pprof
mem_pprof:
GOGC=off go test -memprofile mem.prof -bench=. -benchtime=20s -benchmem ./php7
go tool pprof -alloc_objects ./php7.test mem.prof
GOGC=off go test -memprofile mem.pprof -bench=. -benchtime=20s -benchmem ./php7
go tool pprof -alloc_objects ./php7.test mem.pprof
cpu_pprof_php5:
GOGC=off go test -cpuprofile cpu.prof -bench=. -benchtime=20s ./php5