added profiling commands to Makefile
This commit is contained in:
parent
d67d45948a
commit
112ef18501
7
.gitignore
vendored
7
.gitignore
vendored
@ -1,3 +1,8 @@
|
|||||||
.vscode
|
.vscode
|
||||||
php-parser
|
php-parser
|
||||||
*example.php
|
*example.php
|
||||||
|
|
||||||
|
cpu.prof
|
||||||
|
mem.prof
|
||||||
|
php7.test
|
||||||
|
php5.test
|
||||||
|
12
Makefile
12
Makefile
@ -32,3 +32,15 @@ compile: ./php5/php5.go ./php7/php7.go ./scanner/scanner.go
|
|||||||
|
|
||||||
./php7/php7.go: ./php7/php7.y
|
./php7/php7.go: ./php7/php7.y
|
||||||
goyacc -o $@ $<
|
goyacc -o $@ $<
|
||||||
|
|
||||||
|
profile5:
|
||||||
|
GOGC=off go test -cpuprofile cpu.prof -memprofile mem.prof -bench=. -benchmem -benchtime=20s ./php5
|
||||||
|
|
||||||
|
profile7:
|
||||||
|
GOGC=off go test -cpuprofile cpu.prof -memprofile mem.prof -bench=. -benchmem -benchtime=20s ./php7
|
||||||
|
|
||||||
|
cpu_pprof:
|
||||||
|
go tool pprof cpu.prof
|
||||||
|
|
||||||
|
mem_pprof:
|
||||||
|
go tool pprof mem.prof
|
||||||
|
Loading…
Reference in New Issue
Block a user