|
|
@ -61,6 +61,7 @@ fi |
|
|
|
# Also it's recommended to use `go build` for testing the whole exe. |
|
|
|
# Also it's recommended to use `go build` for testing the whole exe. |
|
|
|
go build -o bin/benchmark |
|
|
|
go build -o bin/benchmark |
|
|
|
go build -o bin/txgen client/txgen/main.go |
|
|
|
go build -o bin/txgen client/txgen/main.go |
|
|
|
|
|
|
|
go build -o bin/beacon runbeacon/run-beacon.go |
|
|
|
|
|
|
|
|
|
|
|
# Create a tmp folder for logs |
|
|
|
# Create a tmp folder for logs |
|
|
|
t=`date +"%Y%m%d-%H%M%S"` |
|
|
|
t=`date +"%Y%m%d-%H%M%S"` |
|
|
@ -68,6 +69,11 @@ log_folder="tmp_log/log-$t" |
|
|
|
|
|
|
|
|
|
|
|
mkdir -p $log_folder |
|
|
|
mkdir -p $log_folder |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ -n "$PEER" ]; then |
|
|
|
|
|
|
|
./bin/beacon > $log_folder/beacon.log 2>&1 & |
|
|
|
|
|
|
|
sleep 1 #wait or beachchain up |
|
|
|
|
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
# Start nodes |
|
|
|
# Start nodes |
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do |
|
|
|
while IFS='' read -r line || [[ -n "$line" ]]; do |
|
|
|
IFS=' ' read ip port mode shardID <<< $line |
|
|
|
IFS=' ' read ip port mode shardID <<< $line |
|
|
@ -77,7 +83,7 @@ while IFS='' read -r line || [[ -n "$line" ]]; do |
|
|
|
./bin/benchmark -ip $ip -port $port -config_file $config -log_folder $log_folder $DB -min_peers $MIN & |
|
|
|
./bin/benchmark -ip $ip -port $port -config_file $config -log_folder $log_folder $DB -min_peers $MIN & |
|
|
|
else |
|
|
|
else |
|
|
|
./bin/benchmark -ip $ip -port $port -log_folder $log_folder $DB $PEER -min_peers $MIN & |
|
|
|
./bin/benchmark -ip $ip -port $port -log_folder $log_folder $DB $PEER -min_peers $MIN & |
|
|
|
sleep 5 |
|
|
|
sleep 1 |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
fi |
|
|
|
done < $config |
|
|
|
done < $config |
|
|
@ -85,3 +91,6 @@ done < $config |
|
|
|
if [ "$TXGEN" == "true" ]; then |
|
|
|
if [ "$TXGEN" == "true" ]; then |
|
|
|
./bin/txgen -config_file $config -log_folder $log_folder -duration $DURATION |
|
|
|
./bin/txgen -config_file $config -log_folder $log_folder -duration $DURATION |
|
|
|
fi |
|
|
|
fi |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Kill nodes if any |
|
|
|
|
|
|
|
./kill_node.sh |
|
|
|