-
Notifications
You must be signed in to change notification settings - Fork 0
/
dilute-parallel.sh
executable file
·66 lines (50 loc) · 1.39 KB
/
dilute-parallel.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
# set -x
declare -x cluster=${cluster:-"testnet-gateway"}
declare -x start=${start:-0}
declare -x end=${end:-4}
declare -x diluteDepth=${diluteDepth:-34}
function dilute {
stampurl=$1
list=( $(curl -s $stampurl | jq -c '.stamps[] | .batchID' | tr '\n' ' ' | tr -d '"' ) )
for i in ${!list[@]};
do
item=${list[$i]}
curl -X PATCH $stampurl/dilute/$item/${diluteDepth}
done
}
nodes=( $(kubectl get ingress -n $cluster | grep debug | awk '{print $3}') )
for i in ${!nodes[@]};
do
node=${nodes[$i]}
stampurl=$node/stamps
# dilute $stampurl &
# curl $url/stake -s
if (( $i < 30 )); then
echo $stampurl
dilute $stampurl &
fi
done
# for i in $(seq $start $end);
# do
# stampurl=http://bee-$i-0-debug.$cluster.testnet.internal/stamps
# dilute $stampurl &
# done
# set -x
# declare -x cluster=${cluster:-"bee-gateway"}
# declare -x start=${start:-0}
# declare -x end=${end:-9}
# declare -x diluteDepth=${diluteDepth:-34}
# function dilute {
# stampurl=$1
# list=( $(curl $stampurl | jq -c '.stamps[] | .batchID' | tr '\n' ' ' | tr -d '"' ) )
# for i in ${!list[@]};
# do
# item=${list[$i]}
# curl -X PATCH $stampurl/dilute/$item/${diluteDepth}
# done
# }
# for i in $(seq $start $end);
# do
# stampurl=http://bee-$i-0-debug.$cluster.mainnet.internal/stamps
# dilute $stampurl &
# done