-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathMakefile
More file actions
39 lines (27 loc) · 670 Bytes
/
Copy pathMakefile
File metadata and controls
39 lines (27 loc) · 670 Bytes
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
PROFILE_ARGS := -cpuprofile cpu.prof -memprofile mem.prof
PROJECT_PATH := $(abspath $(lastword $(MAKEFILE_LIST)))
PROJECT_NAME := $(notdir $(patsubst %/,%,$(dir $(PROJECT_PATH))))
doc:
godoc .
clean:
@rm -f *.prof
@rm -f *.test
install:
go install
cd $(PROJECT_NAME) && go install
test:
go test
test_single:
go test -run $(TESTNAME)
coverage_annotate:
gocov test | gocov annotate -
coverage_report:
gocov test | gocov report
profile_test:
go test $(PROFILE_ARGS) .
profile_test_single:
go test $(PROFILE_ARGS) -run $(TESTNAME)
profile_results_cpu:
go tool pprof cpu.prof
profile_results_mem:
go tool pprof http://localhost:6060/debug/pprof/heap