Created
November 2, 2017 08:06
-
-
Save kyyberi/73a73aa7746d3b2815ba6b616c106dc1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
declare -a arr=( "https://apinf.io:3002/apinf/catalog/api/v1/apis?limit=200&managedAPIs=true" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=100" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=design" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=production" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?limit=70" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=100" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?ski=1&limit=50&lifecycle=design" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=200&limit=10&lifecycle=production" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?limit=5" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?sql=100" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=retired" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis?skip=10&limit=50&lifecycle=production" | |
"https://apinf.io:3002/apinf/catalog/api/v1/apis" | |
) | |
declare -r prefix="curl -X GET " | |
declare -r append="&api_key=YOUR-APINF-API-KEY-HERE" | |
while : | |
do | |
counter="0" | |
while [ $counter -lt 10 ] | |
do | |
sleep $[ ( $RANDOM % 3 ) + 0 ]s | |
for i in "${arr[@]}" | |
do | |
operation=$prefix$i$append | |
echo $operation | |
#RESPONSE=`$operation` | |
#echo $RESPONSE | |
cmd=$($operation > /dev/null 2>&1) | |
done | |
counter=$[$counter+1] | |
echo Round $counter | |
done | |
echo "sleeping for 10 secs" | |
sleep 10 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment