Skip to content

Commit

Permalink
fix bug in run.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
clauyan committed Oct 22, 2024
1 parent 3ac1c64 commit a6059c5
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/bin/bash

SPSH_BASE=$1
CONFIG=$2 # stage configuration (spike, stress, breakpoint)

Expand Down Expand Up @@ -25,7 +27,8 @@ if [[ ! -d output/ ]]; then
fi

for uc in loadtest/usecases/*; do
if [[ "$uc" =~ "$PATTERN" ]]; then
if [[ "$uc" =~ $PATTERN ]]; then
filename=${uc##*/}
# compatibility-mode for typescript
options="--compatibility-mode=experimental_enhanced"

Expand All @@ -34,7 +37,6 @@ for uc in loadtest/usecases/*; do
options="${options} --insecure-skip-tls-verify"

# setup csv file for output
filename=${uc##*/}
csv="output/${filename%.ts}.csv"
touch "$csv"
if [[ -w "$csv" ]]; then
Expand All @@ -44,6 +46,6 @@ for uc in loadtest/usecases/*; do
options="${options} -o experimental-prometheus-rw"
fi
K6_PROMETHEUS_RW_SERVER_URL=http://application-kube-prometheu-prometheus.monitoring:9090/api/v1/write \
k6 run $options -e SPSH_BASE="$SPSH_BASE" -e CONFIG="$CONFIG" -e KC_BASE="$KC_BASE" --tag usecase="$filename" --tag started=$(date -u +%s) "$uc"
k6 run $options -e SPSH_BASE="$SPSH_BASE" -e CONFIG="$CONFIG" -e KC_BASE="$KC_BASE" --tag usecase="$filename" --tag started="$(date -u +%s)" "$uc"
fi
done

0 comments on commit a6059c5

Please sign in to comment.