-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
53 lines (40 loc) · 1.16 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
GOFILES = $(shell find . -name "*.go")
all: bin/raft bin/client
bin/raft: cmd/server/main.go $(GOFILES)
mkdir -p bin
go build -o bin/raft cmd/server/main.go
bin/client: cmd/client/main.go $(GOFILES)
mkdir -p bin
go build -o bin/client cmd/client/main.go
.PHONY: clean
clean:
rm -rf bin
rm -f *.log
.PHONY: protocompile
protocompile:
cd pkg/rpc && protoc --gofast_out=. network.proto && cd ../../
cd pkg/rpc && protoc --gofast_out=. raft_msg.proto && cd ../../
.PHONY: perf_test
perf_test: bin/raft bin/client tests/perf_tests/perf_test.py tests/perf_tests/config.ini
@echo "Read : Write = 3 : 1"
@echo "Rate: 200 req/s"
python3 tests/perf_tests/perf_test.py 200
@rm *.log
@echo "Rate: 400 req/s"
python3 tests/perf_tests/perf_test.py 400
@rm *.log
@echo "Rate: 600 req/s"
python3 tests/perf_tests/perf_test.py 600
@rm *.log
@echo "Rate: 900 req/s"
python3 tests/perf_tests/perf_test.py 900
@rm *.log
@echo "Rate: 1200 req/s"
python3 tests/perf_tests/perf_test.py 1200
@rm *.log
@echo "Rate: 1800 req/s"
python3 tests/perf_tests/perf_test.py 1800
@rm *.log
@echo "Rate: 2000 req/s"
python3 tests/perf_tests/perf_test.py 2000
@rm *.log