You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: test/perf-test/kwokmcadperf.sh
+30-26
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ function help() {
10
10
echo
11
11
echo"Preconditions: "
12
12
echo" - The script assumes you've logged into your cluster already. If not, it will tell you to login."
13
-
echo" - The script checks that you have the mcad-controller installed, otherwise it'll tell you to install it first."
13
+
echo" - The script checks that you have the mcad-controller installed (or the newer CodeFlare Operator), otherwise it'll tell you to install it first."
14
14
echo" - The script checks that you have the kwok-controller installed, otherwise it'll tell you to install it first."
15
15
echo
16
16
echo"Options:"
@@ -40,12 +40,15 @@ function check_mcad_installed_status() {
40
40
res2="$?"
41
41
kubectl get crd |grep appwrapper &> /dev/null
42
42
res3="$?"
43
+
kubectl get pod -A |grep codeflare-operator-manager &> /dev/null
echo"You need Install MCAD Controller first before running this script"
51
+
echo"You need Install the MCAD Controller or the latest CodeFlare Operator first before running this script"
49
52
exit 1
50
53
else
51
54
echo"Nice, MCAD Controller is installed"
@@ -95,7 +98,7 @@ echo
95
98
check_kwok_installed_status
96
99
97
100
echo
98
-
read -p "How many fake KWOK appwrapper jobs do you want?"jobs
101
+
read -p "How many fake KWOK appwrapper jobs do you want?"JOBS
99
102
100
103
# Start the timer now
101
104
SECONDS=0
@@ -106,54 +109,55 @@ echo " "
106
109
echo"Jobs started at: $STARTTIME"|tee fake-job-$STARTTIME.log
107
110
echo""
108
111
109
-
# This fixes the number of jobs to be one less so the for loop gets the right amount
110
-
((realjobs=$jobs-1))
111
-
112
-
fornumin$(eval echo"{0.."$realjobs"}")
112
+
COUNTER=1
113
+
while [ $COUNTER-le$JOBS ]
113
114
do
114
-
next_num=$(($num+1))
115
-
echo"Submitting job $next_num"
115
+
ORIG_COUNTER=$(($COUNTER-1))
116
+
echo"Submitting job $COUNTER"
117
+
116
118
# Had to do this OSTYPE because sed acts differently on Linux versus Mac
117
119
case"$OSTYPE"in
118
120
linux-gnu*)
119
-
sed -i "s/fake-defaultaw-schd-spec-with-timeout-$num/fake-defaultaw-schd-spec-with-timeout-$next_num/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
120
-
darwin*)
121
-
sed -i ''"s/fake-defaultaw-schd-spec-with-timeout-$num/fake-defaultaw-schd-spec-with-timeout-$next_num/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
122
-
*)
123
-
sed -i "s/fake-defaultaw-schd-spec-with-timeout-$num/fake-defaultaw-schd-spec-with-timeout-$next_num/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
121
+
sed -i "s/fake-defaultaw-schd-spec-with-timeout-$ORIG_COUNTER/fake-defaultaw-schd-spec-with-timeout-$COUNTER/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
122
+
darwin*)
123
+
sed -i ''"s/fake-defaultaw-schd-spec-with-timeout-$ORIG_COUNTER/fake-defaultaw-schd-spec-with-timeout-$COUNTER/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
124
+
*)
125
+
sed -i "s/fake-defaultaw-schd-spec-with-timeout-$ORIG_COUNTER/fake-defaultaw-schd-spec-with-timeout-$COUNTER/g"${SCRIPT_DIR}/preempt-exp-kwok.yaml ;;
Copy file name to clipboardExpand all lines: test/perf-test/perf.sh
+29-26
Original file line number
Diff line number
Diff line change
@@ -9,7 +9,7 @@ function help() {
9
9
echo
10
10
echo"Preconditions: "
11
11
echo" - The script assumes you've logged into your cluster already. If not, it will tell you to login."
12
-
echo" - The script checks that you have the mcad-controller installed, otherwise it'll tell you to install it first."
12
+
echo" - The script checks that you have the mcad-controller installed (or the newer CodeFlare Operator), otherwise it'll tell you to install it first."
13
13
echo
14
14
echo"Options:"
15
15
echo" -h Print this help message"
@@ -38,12 +38,15 @@ function check_mcad_installed_status() {
38
38
res2="$?"
39
39
kubectl get crd |grep appwrapper &> /dev/null
40
40
res3="$?"
41
+
kubectl get pod -A |grep codeflare-operator-manager &> /dev/null
0 commit comments