[refactoring] update makefile
This commit is contained in:
12
Makefile
12
Makefile
@@ -19,8 +19,8 @@ cover:
|
||||
go test ./... --cover
|
||||
|
||||
bench:
|
||||
go test -benchmem -bench=. ./php5
|
||||
go test -benchmem -bench=. ./php7
|
||||
go test -benchmem -bench=. ./internal/php5
|
||||
go test -benchmem -bench=. ./internal/php7
|
||||
|
||||
compile: ./internal/php5/php5.go ./internal/php7/php7.go ./internal/scanner/scanner.go fmt
|
||||
sed -i '' -e 's/yyErrorVerbose = false/yyErrorVerbose = true/g' ./internal/php7/php7.go
|
||||
@@ -40,17 +40,17 @@ compile: ./internal/php5/php5.go ./internal/php7/php7.go ./internal/scanner/scan
|
||||
goyacc -o $@ $<
|
||||
|
||||
cpu_pprof:
|
||||
go test -cpuprofile cpu.pprof -bench=. -benchtime=20s ./php7
|
||||
go test -cpuprofile cpu.pprof -bench=. -benchtime=20s ./internal/php7
|
||||
go tool pprof ./php7.test cpu.pprof
|
||||
|
||||
mem_pprof:
|
||||
go test -memprofile mem.pprof -bench=. -benchtime=20s -benchmem ./php7
|
||||
go test -memprofile mem.pprof -bench=. -benchtime=20s -benchmem ./internal/php7
|
||||
go tool pprof -alloc_objects ./php7.test mem.pprof
|
||||
|
||||
cpu_pprof_php5:
|
||||
go test -cpuprofile cpu.prof -bench=. -benchtime=20s ./php5
|
||||
go test -cpuprofile cpu.prof -bench=. -benchtime=20s ./internal/php5
|
||||
go tool pprof ./php5.test cpu.prof
|
||||
|
||||
mem_pprof_php5:
|
||||
go test -memprofile mem.prof -bench=. -benchtime=20s -benchmem ./php5
|
||||
go test -memprofile mem.prof -bench=. -benchtime=20s -benchmem ./internal/php5
|
||||
go tool pprof -alloc_objects ./php5.test mem.prof
|
||||
|
||||
Reference in New Issue
Block a user