make profiling a phony task
This commit is contained in:
parent
444c559510
commit
0f3a64f9af
13
Makefile
13
Makefile
@ -1,6 +1,8 @@
|
|||||||
SOURCES = $(shell find . -name '*.go')
|
SOURCES = $(shell find . -name '*.go')
|
||||||
PARSERS = $(shell find . -name '*.treerack')
|
PARSERS = $(shell find . -name '*.treerack')
|
||||||
|
|
||||||
|
.PHONY: cpu.out
|
||||||
|
|
||||||
default: build
|
default: build
|
||||||
|
|
||||||
deps:
|
deps:
|
||||||
@ -39,6 +41,7 @@ generate: $(SOURCES) $(PARSERS) fmt head install
|
|||||||
regenerate: $(SOURCES) $(PARSERS) fmt head install
|
regenerate: $(SOURCES) $(PARSERS) fmt head install
|
||||||
treerack generate -export -package-name self < syntax.treerack > self/self.go.next
|
treerack generate -export -package-name self < syntax.treerack > self/self.go.next
|
||||||
@mv self/self.go{.next,}
|
@mv self/self.go{.next,}
|
||||||
|
go install ./cmd/treerack
|
||||||
treerack generate -export -package-name self < syntax.treerack > self/self.go.next
|
treerack generate -export -package-name self < syntax.treerack > self/self.go.next
|
||||||
@mv self/self.go{.next,}
|
@mv self/self.go{.next,}
|
||||||
@gofmt -s -w self/self.go
|
@gofmt -s -w self/self.go
|
||||||
@ -77,15 +80,15 @@ check-generate: $(SOURCES) $(PARSERS)
|
|||||||
@mv head.go.backup head.go
|
@mv head.go.backup head.go
|
||||||
@mv self/self.go.backup self/self.go
|
@mv self/self.go.backup self/self.go
|
||||||
|
|
||||||
check: imports build $(PARSERS)
|
check: build $(PARSERS)
|
||||||
go test -test.short -run ^Test
|
go test -test.short -run ^Test
|
||||||
go test ./cmd/treerack -test.short -run ^Test
|
go test ./cmd/treerack -test.short -run ^Test
|
||||||
|
|
||||||
checkall: imports build $(PARSERS)
|
checkall: build $(PARSERS)
|
||||||
go test
|
go test
|
||||||
go test ./cmd/treerack
|
go test ./cmd/treerack
|
||||||
|
|
||||||
.coverprofile: $(SOURCES) imports
|
.coverprofile: $(SOURCES)
|
||||||
go test -coverprofile .coverprofile
|
go test -coverprofile .coverprofile
|
||||||
|
|
||||||
cover: .coverprofile
|
cover: .coverprofile
|
||||||
@ -94,7 +97,7 @@ cover: .coverprofile
|
|||||||
showcover: .coverprofile
|
showcover: .coverprofile
|
||||||
go tool cover -html .coverprofile
|
go tool cover -html .coverprofile
|
||||||
|
|
||||||
.coverprofile-cmd: $(SOURCES) imports
|
.coverprofile-cmd: $(SOURCES)
|
||||||
go test ./cmd/treerack -coverprofile .coverprofile-cmd
|
go test ./cmd/treerack -coverprofile .coverprofile-cmd
|
||||||
|
|
||||||
cover-cmd: .coverprofile-cmd
|
cover-cmd: .coverprofile-cmd
|
||||||
@ -108,7 +111,7 @@ publishcoverage: .coverprofile
|
|||||||
curl -s https://codecov.io/bash -o codecov
|
curl -s https://codecov.io/bash -o codecov
|
||||||
bash codecov -Zf .coverprofile
|
bash codecov -Zf .coverprofile
|
||||||
|
|
||||||
cpu.out: $(SOURCES) $(PARSERS)
|
cpu.out:
|
||||||
go test -v -run TestMMLFile -cpuprofile cpu.out
|
go test -v -run TestMMLFile -cpuprofile cpu.out
|
||||||
|
|
||||||
cpu: cpu.out
|
cpu: cpu.out
|
||||||
|
19
notes.txt
19
notes.txt
@ -1,9 +1,10 @@
|
|||||||
[next]
|
[next]
|
||||||
no random generator output and generator output check
|
|
||||||
errors
|
errors
|
||||||
generator 1
|
generator 1
|
||||||
|
documentation
|
||||||
|
parser 1
|
||||||
releasing
|
releasing
|
||||||
parser
|
parser 2
|
||||||
generator 2
|
generator 2
|
||||||
formatter
|
formatter
|
||||||
report unused parsers
|
report unused parsers
|
||||||
@ -20,7 +21,9 @@ input name needed in command to differentiate between syntax and input in check
|
|||||||
allchars: can have char sequence
|
allchars: can have char sequence
|
||||||
make generator output non-random (track parsers in a list in definition order)
|
make generator output non-random (track parsers in a list in definition order)
|
||||||
fix the license in the output
|
fix the license in the output
|
||||||
play with the int sizes
|
|
||||||
|
[generator 2]
|
||||||
|
js
|
||||||
|
|
||||||
[releasing]
|
[releasing]
|
||||||
spellcheck
|
spellcheck
|
||||||
@ -28,14 +31,15 @@ linting
|
|||||||
convert notes into issues
|
convert notes into issues
|
||||||
try to remove some files
|
try to remove some files
|
||||||
|
|
||||||
[parser]
|
[parser 1]
|
||||||
|
try winning on allChars
|
||||||
|
retry collapsing
|
||||||
|
|
||||||
|
[parser 2]
|
||||||
custom tokens
|
custom tokens
|
||||||
indentation
|
indentation
|
||||||
streaming support // ReadNode(io.Reader)
|
streaming support // ReadNode(io.Reader)
|
||||||
|
|
||||||
[generator 2]
|
|
||||||
js
|
|
||||||
|
|
||||||
[optimization]
|
[optimization]
|
||||||
try preallocate larger store chunks
|
try preallocate larger store chunks
|
||||||
|
|
||||||
@ -44,3 +48,4 @@ how the char classes are different from regexp
|
|||||||
why need nows when using ws
|
why need nows when using ws
|
||||||
lib only useful for dynamic syntax definition
|
lib only useful for dynamic syntax definition
|
||||||
warn nows usage in docs, e.g. spaces in symbol = [a-z]+
|
warn nows usage in docs, e.g. spaces in symbol = [a-z]+
|
||||||
|
tutorial
|
||||||
|
Loading…
Reference in New Issue
Block a user