tendermint/test/net/test.sh

59 lines
1.3 KiB
Bash
Raw Normal View History

#! /bin/bash
set -eu
# start a testnet and benchmark throughput using mintnet+netmon via the network_testing repo
DATACENTER=single
VALSETSIZE=4
BLOCKSIZE=8092
TX_SIZE=200
NTXS=$((BLOCKSIZE*4))
RESULTSDIR=results
CLOUD_PROVIDER=digitalocean
2016-08-05 17:42:52 -07:00
set +u
if [[ "$MACH_PREFIX" == "" ]]; then
MACH_PREFIX=mach
fi
set -u
export TMHEAD=`git rev-parse --abbrev-ref HEAD`
export TM_IMAGE="tendermint/tmbase"
2016-10-19 18:15:55 -07:00
# grab glide for dependency mgmt
go get github.com/Masterminds/glide
2016-10-12 09:28:34 -07:00
# grab network monitor, install mintnet, netmon
2016-10-19 18:15:55 -07:00
# these might err
echo "... fetching repos. ignore go get errors"
set +e
go get github.com/tendermint/network_testing
2016-08-05 17:01:32 -07:00
go get github.com/tendermint/mintnet
go get github.com/tendermint/netmon
2016-10-12 09:28:34 -07:00
set -e
2016-08-05 17:01:32 -07:00
2016-10-12 09:28:34 -07:00
# install vendored deps
2016-10-19 18:15:55 -07:00
echo "GOPATH $GOPATH"
2016-10-12 09:28:34 -07:00
cd $GOPATH/src/github.com/tendermint/mintnet
2016-10-19 18:15:55 -07:00
echo "... install mintnet dir $(pwd)"
2016-10-12 09:28:34 -07:00
glide install
go install
cd $GOPATH/src/github.com/tendermint/netmon
2016-10-19 18:15:55 -07:00
echo "... install netmon dir $(pwd)"
2016-10-12 09:28:34 -07:00
glide install
go install
2016-08-05 17:01:32 -07:00
cd $GOPATH/src/github.com/tendermint/network_testing
2016-10-19 18:15:55 -07:00
echo "... running network test $(pwd)"
bash experiments/exp_throughput.sh $DATACENTER $VALSETSIZE $BLOCKSIZE $TX_SIZE $NTXS $MACH_PREFIX $RESULTSDIR $CLOUD_PROVIDER
2016-08-05 18:20:01 -07:00
# TODO: publish result!
# cleanup
2016-10-19 18:15:55 -07:00
echo "... destroying machines"
2016-08-05 18:20:01 -07:00
mintnet destroy --machines $MACH_PREFIX[1-$VALSETSIZE]