-
Notifications
You must be signed in to change notification settings - Fork 4
/
Makefile
42 lines (33 loc) · 929 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
.PHONY: init
init:
go mod download
go install github.com/golang/mock/mockgen
go install github.com/google/wire/cmd/wire
.PHONY: dev
dev:
docker-compose -f docker/dev/docker-compose.yaml up --build
.PHONY: test
test:
-docker-compose -f docker/test/docker-compose.yaml down
docker-compose -f docker/test/docker-compose.yaml up --build
.PHONY: tuning
tuning:
docker-compose -f docker/tuning/docker-compose.yaml up --build
.PHONY: pprof
pprof:
go tool pprof -png -output pprof.png http://localhost:6060/debug/pprof/profile
.PHONY: slow
slow:
docker-compose -f docker/tuning/docker-compose.yaml exec mysql pt-query-digest /tmp/mysql-slow.sql
.PHONY: myprof
myprof:
docker-compose -f docker/tuning/docker-compose.yaml exec mysql myprofiler -user=root -password=password ${ARGS}
.PHONY: build
build:
go build -o anke-to
.PHONY: bench
bench: build
./anke-to bench
.PHONY: bench-init
bench-init: build
./anke-to init