Skip to content

Commit e3de508

Browse files
committed
tweak: Remove unused variants in insecure-bank, tidy k6 .sh commands
1 parent c40ca32 commit e3de508

File tree

4 files changed

+7
-24
lines changed

4 files changed

+7
-24
lines changed

benchmark/load/insecure-bank/k6.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,6 @@ const variants = {
2020
"iast_FULL": {
2121
"APP_URL": 'http://localhost:8085',
2222
},
23-
"iast_INACTIVE": {
24-
"APP_URL": 'http://localhost:8086',
25-
},
26-
"iast_TELEMETRY_OFF": {
27-
"APP_URL": 'http://localhost:8087',
28-
},
29-
"iast_HARDCODED_SECRET_DISABLED": {
30-
"APP_URL": 'http://localhost:8088',
31-
},
3223
}
3324

3425
export const options = function (variants) {

benchmark/load/insecure-bank/start-servers.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,5 @@ start_server "profiling" "-javaagent:${TRACER} -Ddd.profiling.enabled=true -Dser
2424
start_server "iast" "-javaagent:${TRACER} -Ddd.iast.enabled=true -Dserver.port=8083" "taskset -c 44 " &
2525
start_server "iast_GLOBAL" "-javaagent:${TRACER} -Ddd.iast.enabled=true -Ddd.iast.context.mode=GLOBAL -Dserver.port=8084" "taskset -c 43 " &
2626
start_server "iast_FULL" "-javaagent:${TRACER} -Ddd.iast.enabled=true -Ddd.iast.detection.mode=FULL -Dserver.port=8085" "taskset -c 42 " &
27-
start_server "iast_INACTIVE" "-javaagent:${TRACER} -Ddd.iast.enabled=inactive -Dserver.port=8086" "taskset -c 41 " &
28-
start_server "iast_TELEMETRY_OFF" "-javaagent:${TRACER} -Ddd.iast.enabled=true -Ddd.iast.telemetry.verbosity=OFF -Dserver.port=8087" "taskset -c 40 " &
29-
start_server "iast_HARDCODED_SECRET_DISABLED" "-javaagent:${TRACER} -Ddd.iast.enabled=true -Ddd.iast.hardcoded-secret.enabled=false -Dserver.port=8088" "taskset -c 39 " &
3027

3128
wait

benchmark/load/run.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,21 @@ for app in *; do
5555
for i in $(seq 1 $REPETITIONS_COUNT); do
5656
bash -c "${UTILS_DIR}/../${type}/${app}/start-servers.sh" &
5757

58+
echo "Waiting for serves to start..."
5859
if [ "${app}" == "petclinic" ]; then
5960
for port in $(seq 8080 8085); do
6061
healthcheck http://localhost:$port
6162
done
6263
elif [ "${app}" == "insecure-bank" ]; then
63-
for port in $(seq 8080 8088); do
64+
for port in $(seq 8080 8085); do
6465
healthcheck http://localhost:$port/login
6566
done
6667
fi
68+
echo "Servers are up!"
6769

6870
(
6971
cd ${app} &&
70-
bash -c "${CPU_AFFINITY_K6}${UTILS_DIR}/run-k6-load-test.sh ${HEALTHCHECK_URL} 'pkill java'"
72+
bash -c "${CPU_AFFINITY_K6}${UTILS_DIR}/run-k6-load-test.sh 'pkill java'"
7173
)
7274
done
7375

benchmark/utils/run-k6-load-test.sh

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/usr/bin/env bash
22
set -eu
33

4-
url=$1
5-
command=$2
4+
command=$1
65
exit_code=0
76

87
cleanup() {
@@ -13,16 +12,10 @@ cleanup() {
1312

1413
trap cleanup EXIT ERR INT TERM
1514

16-
echo "Waiting for the HTTP server on ${url} to be up"
17-
while true; do
18-
if [[ $(curl -fso /dev/null -w "%{http_code}" "${url}") = 200 ]]; then
19-
break
20-
fi
21-
done
22-
echo "Server is up! Starting k6 load test, log is in ${LOGS_DIR}/k6.log..."
15+
echo "Starting k6 load test, logs are recorded into ${LOGS_DIR}/k6.log..."
2316

2417
# run the k6 benchmark and store the result as JSON
2518
k6 run k6.js --out "json=${OUTPUT_DIR}/k6_$(date +%s).json" > "${LOGS_DIR}/k6.log" 2>&1
2619
exit_code=$?
2720

28-
echo "k6 load test done!"
21+
echo "k6 load test done !!!"

0 commit comments

Comments
 (0)