-
Notifications
You must be signed in to change notification settings - Fork 56
/
run-all_small.sh
executable file
·93 lines (67 loc) · 2.4 KB
/
run-all_small.sh
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
if [ -z "$CH_MACHINE" ] ; then
echo "You must set an ENV variable, example:"
echo "export CH_MACHINE=Laptop"
echo "export CH_MACHINE=t2.micro"
exit
fi
function chapter {
echo
echo
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
echo @@@ $1
echo @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
}
# exit when any command fails
set -e
# keep track of the last executed command
trap 'last_command=$current_command; current_command=$BASH_COMMAND' DEBUG
# echo an error message before exiting
trap 'echo; echo "\"${last_command}\" command filed with exit code $?."' EXIT
#
chapter "TEST: runs on ALL networks, but SMALL number of transactions"
echo
echo machine name: $CH_MACHINE
echo
if [ "$CH_QUORUM" = true ]; then
echo You want me to also run Quorum which needs more RAM.
echo Think twice, this would not work on a t2.micro machine.
echo Better keep an eye on your RAM, with
echo 'watch -n 5 "free -m"'
else
echo Skipping Quorum, good on small machines, if you do want it, set CH_QUORUM=true
fi
echo
sleep 1
echo
chapter "$CH_MACHINE-TestRPC"
CH_TXS=400 CH_THREADING="sequential" ./run.sh "$CH_MACHINE-TestRPC" testrpc
chapter "$CH_MACHINE-Geth"
CH_TXS=3000 CH_THREADING="threaded2 20" ./run.sh "$CH_MACHINE-Geth" geth-clique
chapter "$CH_MACHINE-Quorum"
if [ "$CH_QUORUM" = true ]; then
networks/quorum-configure.sh
CH_TXS=4000 CH_THREADING="threaded2 20" ./run.sh "$CH_MACHINE-Quorum" quorum
else
echo
echo Skipping Quorum, see very beginning of output of this script.
echo
fi
chapter "$CH_MACHINE-Parity-instantseal"
# PARITY_VERSION=v2.2.3
PARITY_VERSION=v1.11.11
networks/parity-configure-instantseal.sh $PARITY_VERSION
# would like to run multithreaded too but then parity stops working
# see issue github.com/paritytech/parity-ethereum/issues/9582
# so instead of multithreaded sending:
# TXS=1000 THREADING="threaded2 20" ./run.sh $CH_MACHINE-Parity-instantseal parity
# I must use non-threaded sending:
CH_TXS=2000 CH_THREADING="sequential" ./run.sh "$CH_MACHINE-Parity-instantseal" parity
chapter "$CH_MACHINE-Parity-aura"
networks/parity-configure-aura.sh $PARITY_VERSION
CH_TXS=2000 CH_THREADING="sequential" ./run.sh "$CH_MACHINE-Parity-aura" parity
chapter "run-all_....sh composite script ending here"
echo see folder results/runs/
echo
# switch off the trap
set +e
trap '' EXIT