forked from nfx/slrp
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
49 lines (33 loc) · 846 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
default: build
build-ui:
npm --prefix ui run build
dev-ui:
npm --prefix ui start
snapshot: build-ui
goreleaser build --snapshot --rm-dist --single-target
build: build-ui
go mod vendor
go build -ldflags "-s -w" main.go
quick:
go build
fmt:
go fmt ./...
profiled: quick
SLRP_PPROF_ENABLE=true slrp
heap-profile:
go tool pprof http://localhost:6060/debug/pprof/heap
cpu-profile:
go tool pprof http://localhost:6060/debug/pprof/profile?seconds=60
block-profile:
go tool pprof http://localhost:6060/debug/pprof/block
pprof:
go tool pprof -http=:8080 slrp http://127.0.0.1:6060/debug/pprof/profile
race:
GORACE="halt_on_error=1" go run -race main.go
vendor:
go mod vendor
test:
go test ./... -coverprofile=coverage.txt -timeout=30s
coverage: test
go tool cover -html=coverage.txt
.PHONY: build fmt coverage test vendor