|
@@ -0,0 +1,33 @@
|
|
|
|
+RESOURCES='members councils proposals channels categories threads posts blocks events eras'
|
|
|
|
+SLEEP=15
|
|
|
|
+API=/api/v1/
|
|
|
|
+BALANCER=https://api.joystreamstats.live
|
|
|
|
+SERVER1=https://frankfurt.api.joystreamstats.live
|
|
|
|
+SERVER2=https://helsinki.api.joystreamstats.live
|
|
|
|
+
|
|
|
|
+CURL_OPTIONS='-s -o NUL -w %{time_total}s'
|
|
|
|
+
|
|
|
|
+while [[ 1 ]] ; do
|
|
|
|
+
|
|
|
|
+printf "%15s %15s %15s %15s\n" resource balancer frankfurt helsinki
|
|
|
|
+
|
|
|
|
+for res in $RESOURCES
|
|
|
|
+do
|
|
|
|
+ printf "%15s %15s %15s %15s\n" $res \
|
|
|
|
+ `curl $BALANCER$API$res/1 $CURL_OPTIONS` \
|
|
|
|
+ `curl $SERVER1$API$res/1 $CURL_OPTIONS` \
|
|
|
|
+ `curl $SERVER2$API$res/1 $CURL_OPTIONS`
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+for res in $RESOURCES
|
|
|
|
+do
|
|
|
|
+ printf "%15s %15s %15s %15s\n" "$res (1)" \
|
|
|
|
+ `curl $BALANCER$API$res/1 $CURL_OPTIONS` \
|
|
|
|
+ `curl $SERVER1$API$res/1 $CURL_OPTIONS` \
|
|
|
|
+ `curl $SERVER2$API$res/1 $CURL_OPTIONS`
|
|
|
|
+done
|
|
|
|
+
|
|
|
|
+printf "%30s" "restarting in $SLEEP"
|
|
|
|
+sleep $SLEEP
|
|
|
|
+printf "\r%30s\n" ""
|
|
|
|
+done
|