forked from cosmos/iavl
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Makefile
46 lines (36 loc) · 1.22 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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
PDFFLAGS := -pdf --nodefraction=0.1
all: test
test:
go test -v --race
# bench is the basic tests that shouldn't crash an aws instance
bench:
cd benchmarks && \
go test -bench=RandomBytes . && \
go test -bench=Small . && \
go test -bench=Medium . && \
go test -bench=BenchmarkMemKeySizes .
# fullbench is extra tests needing lots of memory and to run locally
fullbench:
cd benchmarks && \
go test -bench=RandomBytes . && \
go test -bench=Small . && \
go test -bench=Medium . && \
go test -timeout=30m -bench=Large . && \
go test -bench=Mem . && \
go test -timeout=60m -bench=LevelDB .
# note that this just profiles the in-memory version, not persistence
profile:
cd benchmarks && \
go test -bench=Mem -cpuprofile=cpu.out -memprofile=mem.out . && \
go tool pprof ${PDFFLAGS} benchmarks.test cpu.out > cpu.pdf && \
go tool pprof --alloc_space ${PDFFLAGS} benchmarks.test mem.out > mem_space.pdf && \
go tool pprof --alloc_objects ${PDFFLAGS} benchmarks.test mem.out > mem_obj.pdf
explorecpu:
cd benchmarks && \
go tool pprof benchmarks.test cpu.out
exploremem:
cd benchmarks && \
go tool pprof --alloc_objects benchmarks.test mem.out
delve:
dlv test ./benchmarks -- -test.bench=.
.PHONY: all test tools