Skip to content

Commit 9ceed98

Browse files
committed
feat(unique-artifact-dir): Fix the coutner to count each iteration
Signed-off-by: Pavel Macík <pavel.macik@gmail.com>
1 parent 376888d commit 9ceed98

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

ci-scripts/runs-to-csv.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ set -o pipefail
66

77
# Just a helper script to output CSV file based on all found benchmark.json files
88
headers="Build_ID,\
9+
Iteration,\
910
DeployStarted,\
1011
DeployEnded,\
1112
DeployDuration,\
@@ -76,6 +77,7 @@ find "${1:-.}" -name benchmark.json -print0 | while IFS= read -r -d '' filename;
7677
sed -Ee 's/: ([0-9]+\.[0-9]*[X]+[0-9e\+-]*|[0-9]*X+[0-9]*\.[0-9e\+-]*|[0-9]*X+[0-9]*\.[0-9]*X+[0-9e\+-]+)/: "\1"/g' "${filename}" |
7778
jq --raw-output '[
7879
.metadata.env.BUILD_ID,
80+
.metadata.scalability.iteration,
7981
.measurements.timings.deploy.started,
8082
.measurements.timings.deploy.ended,
8183
.measurements.timings.deploy.duration,

ci-scripts/scalability/collect-results.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ csv_delim=";"
3838
csv_delim_quoted="\"$csv_delim\""
3939

4040
echo "Collecting scalability data"
41-
counter=0
41+
counter=1
4242
for w in "${workers[@]}"; do
4343
for r in "${replicas[@]}"; do
4444
for bu_bg in "${bs_users_groups[@]}"; do
@@ -50,7 +50,7 @@ for w in "${workers[@]}"; do
5050
for au_sr in "${active_users_spawn_rate[@]}"; do
5151
IFS=":" read -ra tokens <<<"${au_sr}"
5252
active_users=${tokens[0]}
53-
output="$ARTIFACT_DIR/scalability_c-${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${active_users}u.csv"
53+
output="$ARTIFACT_DIR/scalability_c-${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${active_users}u-${counter}.csv"
5454
header="CatalogSize${csv_delim}Apis${csv_delim}Components${csv_delim}MaxActiveUsers${csv_delim}AverageRPS${csv_delim}MaxRPS${csv_delim}AverageRT${csv_delim}MaxRT${csv_delim}Failures${csv_delim}FailRate${csv_delim}DBStorageUsed${csv_delim}DBStorageAvailable${csv_delim}DBStorageCapacity"
5555
for cr_cl in "${cpu_requests_limits[@]}"; do
5656
IFS=":" read -ra tokens <<<"${cr_cl}"
@@ -65,9 +65,9 @@ for w in "${workers[@]}"; do
6565
IFS=":" read -ra tokens <<<"${a_c}"
6666
a="${tokens[0]}" # apis
6767
[[ "${#tokens[@]}" == 1 ]] && c="" || c="${tokens[1]}" # components
68-
index="${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c-${counter}"
68+
index="${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c"
69+
iteration="${index}/test/${counter}/${active_users}u"
6970
(( counter += 1 ))
70-
iteration="${index}/test/${active_users}u"
7171
echo "[$iteration] Looking for benchmark.json..."
7272
benchmark_json="$(find "${ARTIFACT_DIR}" -name benchmark.json | grep "$iteration" || true)"
7373
if [ -n "$benchmark_json" ]; then

ci-scripts/scalability/test-scalability.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ SCALABILITY_ARTIFACTS="$ARTIFACT_DIR/scalability"
8888
rm -rvf "${SCALABILITY_ARTIFACTS}"
8989
mkdir -p "${SCALABILITY_ARTIFACTS}"
9090

91-
counter=0
91+
counter=1
9292
for w in "${workers[@]}"; do
9393
for bu_bg in "${bs_users_groups[@]}"; do
9494
IFS=":" read -ra tokens <<<"${bu_bg}"
@@ -127,12 +127,11 @@ for w in "${workers[@]}"; do
127127
export WORKERS=$w
128128
export API_COUNT=$a
129129
export COMPONENT_COUNT=$c
130-
index="${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c-${counter}"
130+
index="${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c"
131131
set +x
132-
(( counter += 1 ))
133132
oc login "$OPENSHIFT_API" -u "$OPENSHIFT_USERNAME" -p "$OPENSHIFT_PASSWORD" --insecure-skip-tls-verify=true
134133
make clean-local undeploy-rhdh
135-
setup_artifacts="$SCALABILITY_ARTIFACTS/$index/setup"
134+
setup_artifacts="$SCALABILITY_ARTIFACTS/$index/setup/${counter}"
136135
mkdir -p "$setup_artifacts"
137136
ARTIFACT_DIR=$setup_artifacts ./ci-scripts/setup.sh |& tee "$setup_artifacts/setup.log"
138137
wait_for_indexing |& tee "$setup_artifacts/after-setup-search.log"
@@ -150,11 +149,14 @@ for w in "${workers[@]}"; do
150149
export SPAWN_RATE="${sr}"
151150
set +x
152151
make clean
153-
test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${au}u"
152+
test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${counter}/${au}u"
154153
mkdir -p "$test_artifacts"
155154
wait_for_indexing |& tee "$test_artifacts/before-test-search.log"
156155
ARTIFACT_DIR=$test_artifacts ./ci-scripts/test.sh |& tee "$test_artifacts/test.log"
157156
ARTIFACT_DIR=$test_artifacts ./ci-scripts/collect-results.sh |& tee "$test_artifacts/collect-results.log"
157+
jq ".metadata.scalability.iteration = ${counter}" "$test_artifacts/benchmark.json" > $$.json
158+
mv -vf $$.json "$test_artifacts/benchmark.json"
159+
(( counter += 1 ))
158160
done
159161
done
160162
done

0 commit comments

Comments
 (0)