-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
213 lines (163 loc) · 5.38 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
# Makefile for counters
############################################################################
# Documentation
############################################################################
# Note: You can easily maintain your own set of make targets by creating a
# file called 'private.mk' in this directory, and then tracking that file in
# your private fork. If 'private.mk' exists in this directory it will be
# included by this Makefile.
# The following are the supported make targets:
ifeq (make, targets)
############################################################################
# Stress tests
stress1
A single validating peer with NOOPS consensus and no security. 64 clients
each drive 1000 transactions into a single array without interlock.
stress2b stress2n
A user-mode network of 4 validating peers running without security. Send
10,000 transactions into a single array as a single burst, using only the
first peer, with one interlock at the end of the burst. Consensus
protocols are PBFT Batch (stress2b) or NOOPS (stress2n).
secure1
A 4-node setup with security. Security-mode is so slow that this is not a
very stressful test. This test uses PBFT batch mode.
sweep1b sweep1n
*** Note: The 'sweep1b' target currently appears to work in large server ***
*** environments but not in Vagrant/laptop environments ***
A user-mode network of 4 validating peers running without security. One
chaincode with one array. Sweep the number of clients from 1 to 64 by
powers-of-2, sending a constant 32K transactions into the network
targeting all peers in short bursts, each client interlocking every 64
transactions. Consensus protocols are PBFT Batch (sweep1b) or NOOPS
(sweep1n).
sweep2b sweep2n
*** Note: The 'sweep2b' target does not work at present. These targets ***
*** may be modified or removed in the future. ***
A user-mode network of 4 validating peers running without security. Four
chaincodes, each managing 128 arrays. The median array size here is 64
counters or 512 bytes. Sweep the number of clients from 1 to 64 by
powers-of-2, sending a constant 32K transactions into the network
targeting all peers in moderate bursts, each client interlocking every 256
transactions. Consensus protocols are PBFT Batch (sweep2b) or NOOPS
(sweep2n).
############################################################################
# Miscellaneous
build
Build the chaincode
countersTest
Test the 'counters' chaincode
endif
############################################################################
# Make targets
############################################################################
############################################################################
# Stress tests
NETWORK = ../bin/userModeNetwork
.PHONY: stress1
stress1:
@$(NETWORK) -noops 1
@./driver \
-clients 64 \
-transactions 1000 \
-peerBurst 1000 \
-keepLog
.PHONY: stress2b stress2n
STRESS2 = \
echo "makefile: Sleeping 10 seconds to allow peers to interlock;" \
sleep 10; \
./driver \
-transactions 10000 \
-peerBurst 10000 \
-targetPeers 1 \
-interlock \
-interlockTimeout 5m \
-keepLog \
-checkAgreement -dupCheck
STRESS2_CONFIG = \
@CORE_PBFT_GENERAL_TIMEOUT_NULLREQUEST=3s
stress2b:
@$(STRESS2_CONFIG) $(NETWORK) -batch 4
@$(STRESS2)
stress2n:
@$(STRESS2_CONFIG) $(NETWORK) -noops 4
@$(STRESS2)
.PHONY: secure1
secure1:
@CORE_PBFT_GENERAL_TIMEOUT_NULLREQUEST=3s \
$(NETWORK) -batch -security 4
@echo "makefile: Sleeping 10 seconds to allow peers to interlock"
@sleep 10
@./driver \
-transactions 100 \
-peerBurst 10 \
-interlock \
-keepLog \
-checkAgreement -dupCheck
.PHONY: sweep1b sweep1n
SWEEP1 = \
echo "makefile: Sleeping 10 seconds to allow peers to interlock"; \
sleep 10; \
set -e; \
./driver \
-clients $$clients \
-transactions $$((32768 / $$clients)) \
-peerBurst 8 \
-netBurst 8 \
-interlock -interlockTimeout 5m \
-keepLog \
-convergeWait 5m -convergePoll 5s \
-checkAgreement -dupCheck
SWEEP1_CONFIG = \
CORE_PBFT_GENERAL_TIMEOUT_NULLREQUEST=3s \
CORE_PEER_VALIDATOR_CONSENSUS_BUFFERSIZE=32768
sweep1b:
@for clients in 1 2 4 8 16 32 64; do \
$(SWEEP1_CONFIG) $(NETWORK) -batch 4; \
$(SWEEP1); \
done
sweep1n:
@for clients in 1 2 4 8 16 32 64; do \
$(SWEEP1_CONFIG) $(NETWORK) -noops 4; \
$(SWEEP1); \
done
.PHONY: sweep2b sweep2n
SWEEP2 = \
echo "makefile: Sleeping 10 seconds to allow peers to interlock"; \
sleep 10; \
set -e; \
./driver \
-clients $$clients \
-chaincodes 4 \
-arrays 128 \
-transactions $$((64 / $$clients)) \
-peerBurst 16 \
-netBurst 16 \
-interlock -interlockTimeout 5m \
-keepLog \
-convergeWait 5m -convergePoll 5s \
-checkAgreement -dupCheck
SWEEP2_CONFIG = \
CORE_PBFT_GENERAL_TIMEOUT_NULLREQUEST=3s \
CORE_PEER_VALIDATOR_CONSENSUS_BUFFERSIZE=32768
sweep2b:
@for clients in 1 2 4 8 16 32 64; do \
$(SWEEP2_CONFIG) $(NETWORK) -batch 4; \
$(SWEEP2); \
done
sweep2n:
@for clients in 1 2 4 8 16 32 64; do \
$(SWEEP2_CONFIG) $(NETWORK) -noops 4; \
$(SWEEP2); \
done
############################################################################
# Miscellaneous
.PHONY: build
build:
go build -a
.PHONY: countersTest
countersTest:
./countersTest
# Load the user's private makefile, if it exists.
ifneq (,$(wildcard private.mk))
include private.mk
endif