diff --git a/script.sh b/script.sh index 62555ea..7709f2d 100755 --- a/script.sh +++ b/script.sh @@ -17,10 +17,20 @@ paths=( "/gallery/8" ) -for path in "${paths[@]}"; do +# Hit the home page first +home_url="$base_url" +echo "Requesting URL: $home_url at $(date +"%Y-%m-%d %H:%M:%S")" +response=$(curl -w "\nTime: %{time_total}\nStatus Code: %{http_code}" "$home_url") +echo -e "$response\n---------------------------------------" + +# Wait for 10 seconds +sleep 10s + +# Hit the other pages with a 1-second delay +for path in "${paths[@]:1}"; do url="$base_url$path" echo "Requesting URL: $url at $(date +"%Y-%m-%d %H:%M:%S")" - response=$(curl -w "\nTime: %{time_total}\nStatus Code: %{http_code}" "$url") + response=$(curl -s -w "\nTime: %{time_total}\nStatus Code: %{http_code}" "$url") echo -e "$response\n---------------------------------------" + sleep 1s done -