-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
Makefile
27 lines (21 loc) · 1.04 KB
/
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
install-tools:
go get -u honnef.co/go/tools/cmd/staticcheck
go get -u github.com/kisielk/errcheck
lint:
go vet ./...
go fmt ./...
staticcheck ./...
errcheck ./...
test:
go generate ./...
go test -covermode=atomic ./...
bench:
GOMAXPROCS=8 go test -timeout=1h -bench=. -benchtime=10s -benchmem ./...
bench-transform:
GOMAXPROCS=8 go test -bench=_Transform -benchtime=10s -benchmem ./...
bench-transform-employee:
GOMAXPROCS=8 go test -bench=BenchmarkEmployeeFeatureTransformer_Transform -benchtime=10s -benchmem ./...
profile:
$(shell mkdir -p docs/benchmark_profiles)
go test -bench=BenchmarkWith32FieldsFeatureTransformer_Transform -benchtime=3s -benchmem -memprofile docs/benchmark_profiles/codegen_transform_mem.profile -cpuprofile docs/benchmark_profiles/codegen_transform_cpu.profile ./cmd/generate/tests
go test -bench=BenchmarkStructTransformer_Transform_32fields -benchtime=3s -benchmem -memprofile docs/benchmark_profiles/reflect_transform_mem.profile -cpuprofile docs/benchmark_profiles/reflect_transform_cpu.profile ./structtransformer