You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
1.3 KiB

  1. #! /bin/bash
  2. set -eu
  3. # start a testnet and benchmark throughput using mintnet+netmon via the network_testing repo
  4. DATACENTER=single
  5. VALSETSIZE=4
  6. BLOCKSIZE=8092
  7. TX_SIZE=200
  8. NTXS=$((BLOCKSIZE*4))
  9. RESULTSDIR=results
  10. CLOUD_PROVIDER=digitalocean
  11. set +u
  12. if [[ "$MACH_PREFIX" == "" ]]; then
  13. MACH_PREFIX=mach
  14. fi
  15. set -u
  16. export TMHEAD=`git rev-parse --abbrev-ref HEAD`
  17. export TM_IMAGE="tendermint/tmbase"
  18. # grab glide for dependency mgmt
  19. go get github.com/Masterminds/glide
  20. # grab network monitor, install mintnet, netmon
  21. # these might err
  22. echo "... fetching repos. ignore go get errors"
  23. set +e
  24. go get github.com/tendermint/network_testing
  25. go get github.com/tendermint/mintnet
  26. go get github.com/tendermint/netmon
  27. set -e
  28. # install vendored deps
  29. echo "GOPATH $GOPATH"
  30. cd $GOPATH/src/github.com/tendermint/mintnet
  31. echo "... install mintnet dir $(pwd)"
  32. glide install
  33. go install
  34. cd $GOPATH/src/github.com/tendermint/netmon
  35. echo "... install netmon dir $(pwd)"
  36. glide install
  37. go install
  38. cd $GOPATH/src/github.com/tendermint/network_testing
  39. echo "... running network test $(pwd)"
  40. bash experiments/exp_throughput.sh $DATACENTER $VALSETSIZE $BLOCKSIZE $TX_SIZE $NTXS $MACH_PREFIX $RESULTSDIR $CLOUD_PROVIDER
  41. # TODO: publish result!
  42. # cleanup
  43. echo "... destroying machines"
  44. mintnet destroy --machines $MACH_PREFIX[1-$VALSETSIZE]