forked from kellabyte/go-benchmarks
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
73 lines (56 loc) · 2.71 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
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
.PHONY: hashing http queues json time
projectpath = ${PWD}
glidepath = ${PWD}/vendor/github.com/Masterminds/glide
easyjsonpath = ${PWD}/vendor/github.com/mailru/easyjson
gobench2csv:
@go build -o build/gobench2csv cmd/gobench2csv/main.go
hashing: results
@rm -rf ./results/hashing.*
@go test ./hashing -benchmem -bench=. | tee ./results/hashing.log
@Rscript plotting/gobench_multi_nsop.r ./results/hashing.log ./results/hashing-multi.png
@Rscript plotting/gobench_histogram_nsop.r ./results/hashing.log ./results/hashing-histogram.png
queues: results
@rm -rf ./results/queues.*
@go test ./queues -benchmem -bench=. | tee ./results/queues.log
@Rscript plotting/gobench_single_nsop.r ./results/queues.log ./results/queues.png
json: generate results
@rm -rf ./results/json.*
@go test ./json -benchmem -bench=. | tee ./results/json.log
@Rscript plotting/gobench_multi_nsop.r ./results/json.log ./results/json-multi.png
plot: results
@Rscript plotting/gobench_multi_nsop.r ./results/hashing.log ./results/hashing-multi.png
@Rscript plotting/gobench_histogram_nsop.r ./results/hashing.log ./results/hashing-histogram.png
@Rscript plotting/gobench_single_nsop.r ./results/queues.log ./results/queues.png
@Rscript plotting/gobench_multi_nsop.r ./results/json.log ./results/json-multi.png
http:
@go build -o build/http/evio http/evio.go
time: results
@rm -rf ./results/time.*
@go test ./time -benchmem -bench=. | tee ./results/time.log
@Rscript plotting/gobench_single_nsop.r ./results/time.log ./results/time.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 1 results/time_p90.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 2 results/time_p99.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 3 results/time_p999.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 4 results/time_p9999.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 5 results/time_p99999.png
@Rscript ./plotting/hdr_histogram.r ./results/nanotime.histogram ./results/hrtime.histogram 6 results/time_p999999.png
target:
@go build
test:
@go test
results:
@mkdir results
$(glidepath)/glide:
@git clone https://github.com/Masterminds/glide.git $(glidepath)
@cd $(glidepath);make build
@cp $(glidepath)/glide .
$(easyjsonpath)/.root/bin/easyjson:
@cd $(easyjsonpath); go build -i -o .root/bin/easyjson ./easyjson
easyjson: $(easyjsonpath)/.root/bin/easyjson
@cp $(easyjsonpath)/.root/bin/easyjson .
libs: $(glidepath)/glide
$(glidepath)/glide install
sudo Rscript plotting/setup.r
deps: libs
generate: easyjson
@go generate ./...