-
Notifications
You must be signed in to change notification settings - Fork 533
Expand file tree
/
Copy pathloop.sh
More file actions
53 lines (45 loc) · 1.2 KB
/
loop.sh
File metadata and controls
53 lines (45 loc) · 1.2 KB
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
#!/bin/bash
export OSSProjectRef=True
export RESULTS_PK=test_runs
export PL=18
#These must be configured
export ACCOUNT_ENDPOINT=
export ACCOUNT_KEY=
# Loop forever
i=0
while :
do
#Kill any running processes
pkill -f run.sh
git pull origin master
# Distribute workload between modes
mode=$((i % 3))
if [ $mode -eq 0 ]; then
echo "Running in THINCLIENT mode"
export THINCLIENT_ENABLED=true
export GATEWAYMODE_ENABLED=false
export DIRECTMODE_ENABLED=false
elif [ $mode -eq 1 ]; then
echo "Running in GATEWAY mode"
export THINCLIENT_ENABLED=false
export GATEWAYMODE_ENABLED=true
export DIRECTMODE_ENABLED=false
else
echo "Running in DIRECT mode"
export THINCLIENT_ENABLED=false
export GATEWAYMODE_ENABLED=false
export DIRECTMODE_ENABLED=true
fi
# Query operations take a long time
# Only run them once every 10 runs
if [ $(($i % 10)) -eq 0 ]; then
echo Query run is enabled
export INCLUDE_QUERY=true
else
export INCLUDE_QUERY=false
fi
((i++))
./run.sh
echo "====== Waiting for 10Sec ================="
sleep 10 #Wait for 10sec
done