-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathload.sh
executable file
·38 lines (31 loc) · 907 Bytes
/
load.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
#!/usr/bin/env bash
while true
do
url_start=("http://localhost:8080/api/login" "http://localhost:8080/api/account")
job_seeker_urls=("http://localhost:8080/api/search" "http://localhost:8080/api/getJob" "http://localhost:8080/api/submitCandidate")
job_poster_urls="http://localhost:8080/api/addJob"
urls=("${url_start[@]}")
i=1
num_times=$(((RANDOM % 5)+ 1))
while [ $i -le $num_times ]
do
echo "Adding job seeker $i"
urls+=("${job_seeker_urls[@]}")
i=$((i+1))
done
i=1
num_times=$(((RANDOM % 5)+ 1))
while [ $i -le $num_times ]
do
echo "Adding job poster $i"
urls+=("$job_poster_urls")
i=$((i+1))
done
urls+=("http://localhost:3000/api/logout")
for url in ${urls[@]}
do
echo "curl -s ${url}"
echo "$(curl -s ${url})"
sleep 1
done
done