commit
15b906a7c7
@ -0,0 +1,21 @@ |
||||
import requests |
||||
amazon_ipv4_url = "http://169.254.169.254/latest/meta-data/public-ipv4" |
||||
if __name__ == "__main__": |
||||
current_ip = requests.get(amazon_ipv4_url).text |
||||
f = open("global_nodes.txt","r") |
||||
peerList = [] |
||||
for myline in f: |
||||
mylist = myline.split(" ") |
||||
ip = mylist[0] |
||||
node = mylist[2] |
||||
if node != "transaction": |
||||
peerList.append(myline) |
||||
else: |
||||
h = open("isTransaction.txt","w") |
||||
h.write("I am just a transaction generator node") |
||||
h.close() |
||||
f.close() |
||||
g = open("global_peerlist.txt","w") |
||||
for myline in peerList: |
||||
g.write(myline) |
||||
g.close() |
@ -1,3 +1,3 @@ |
||||
#!/bin/bash -x |
||||
cd /home/ec2-user/projects/src/harmony-benchmark |
||||
./deploy_linux.sh local_config2.txt |
||||
./deploy_one_instance.sh global_nodes.txt |
@ -0,0 +1,20 @@ |
||||
#!/bin/bash -x |
||||
##The commented suffix is for linux |
||||
##Reference: https://github.com/Zilliqa/Zilliqa/blob/master/tests/Node/test_node_simple.sh |
||||
sudo sysctl net.core.somaxconn=1024 |
||||
sudo sysctl net.core.netdev_max_backlog=65536; |
||||
sudo sysctl net.ipv4.tcp_tw_reuse=1; |
||||
sudo sysctl -w net.ipv4.tcp_rmem='65536 873800 1534217728'; |
||||
sudo sysctl -w net.ipv4.tcp_wmem='65536 873800 1534217728'; |
||||
sudo sysctl -w net.ipv4.tcp_mem='65536 873800 1534217728'; |
||||
|
||||
./kill_node.sh |
||||
source ~/.bash_profile |
||||
python aws-scripts/preprocess_peerlist.py |
||||
FILE='isTransaction.txt' |
||||
config=$1 |
||||
if [ -f $FILE ]; then |
||||
go run ./aws-code/transaction_generator.go -config_file $config |
||||
else |
||||
go run ./benchmark_main.go -config_file $config& |
||||
fi |
@ -0,0 +1,3 @@ |
||||
34.219.57.67 9000 validator 0 |
||||
52.43.81.62 9000 leader 0 |
||||
54.201.72.153 9000 transaction 0 |
Loading…
Reference in new issue