Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions ci-scripts/runs-to-csv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ set -o pipefail

# Just a helper script to output CSV file based on all found benchmark.json files
headers="Build_ID,\
Iteration,\
DeployStarted,\
DeployEnded,\
DeployDuration,\
Expand Down Expand Up @@ -76,6 +77,7 @@ find "${1:-.}" -name benchmark.json -print0 | while IFS= read -r -d '' filename;
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}" |
jq --raw-output '[
.metadata.env.BUILD_ID,
.metadata.scalability.iteration,
.measurements.timings.deploy.started,
.measurements.timings.deploy.ended,
.measurements.timings.deploy.duration,
Expand Down
8 changes: 5 additions & 3 deletions ci-scripts/scalability/collect-results.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ csv_delim=";"
csv_delim_quoted="\"$csv_delim\""

echo "Collecting scalability data"
counter=1
for w in "${workers[@]}"; do
for r in "${replicas[@]}"; do
for bu_bg in "${bs_users_groups[@]}"; do
Expand All @@ -49,7 +50,7 @@ for w in "${workers[@]}"; do
for au_sr in "${active_users_spawn_rate[@]}"; do
IFS=":" read -ra tokens <<<"${au_sr}"
active_users=${tokens[0]}
output="$ARTIFACT_DIR/scalability_c-${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${active_users}u.csv"
output="$ARTIFACT_DIR/scalability_c-${r}r-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${active_users}u-${counter}.csv"
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"
for cr_cl in "${cpu_requests_limits[@]}"; do
IFS=":" read -ra tokens <<<"${cr_cl}"
Expand All @@ -59,13 +60,14 @@ for w in "${workers[@]}"; do
IFS=":" read -ra tokens <<<"${mr_ml}"
mr="${tokens[0]}" # memory requests
[[ "${#tokens[@]}" == 1 ]] && ml="" || ml="${tokens[1]}" # memory limits
echo "$header" >"$output"
[[ -f "${output}" ]] || echo "$header" >"$output"
for a_c in "${catalog_apis_components[@]}"; do
IFS=":" read -ra tokens <<<"${a_c}"
a="${tokens[0]}" # apis
[[ "${#tokens[@]}" == 1 ]] && c="" || c="${tokens[1]}" # components
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"
iteration="${index}/test/${active_users}u"
iteration="${index}/test/${counter}/${active_users}u"
(( counter += 1 ))
echo "[$iteration] Looking for benchmark.json..."
benchmark_json="$(find "${ARTIFACT_DIR}" -name benchmark.json | grep "$iteration" || true)"
if [ -n "$benchmark_json" ]; then
Expand Down
8 changes: 6 additions & 2 deletions ci-scripts/scalability/test-scalability.sh
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ SCALABILITY_ARTIFACTS="$ARTIFACT_DIR/scalability"
rm -rvf "${SCALABILITY_ARTIFACTS}"
mkdir -p "${SCALABILITY_ARTIFACTS}"

counter=1
for w in "${workers[@]}"; do
for bu_bg in "${bs_users_groups[@]}"; do
IFS=":" read -ra tokens <<<"${bu_bg}"
Expand Down Expand Up @@ -130,7 +131,7 @@ for w in "${workers[@]}"; do
set +x
oc login "$OPENSHIFT_API" -u "$OPENSHIFT_USERNAME" -p "$OPENSHIFT_PASSWORD" --insecure-skip-tls-verify=true
make clean-local undeploy-rhdh
setup_artifacts="$SCALABILITY_ARTIFACTS/$index/setup"
setup_artifacts="$SCALABILITY_ARTIFACTS/$index/setup/${counter}"
mkdir -p "$setup_artifacts"
ARTIFACT_DIR=$setup_artifacts ./ci-scripts/setup.sh |& tee "$setup_artifacts/setup.log"
wait_for_indexing |& tee "$setup_artifacts/after-setup-search.log"
Expand All @@ -148,11 +149,14 @@ for w in "${workers[@]}"; do
export SPAWN_RATE="${sr}"
set +x
make clean
test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${au}u"
test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${counter}/${au}u"
mkdir -p "$test_artifacts"
wait_for_indexing |& tee "$test_artifacts/before-test-search.log"
ARTIFACT_DIR=$test_artifacts ./ci-scripts/test.sh |& tee "$test_artifacts/test.log"
ARTIFACT_DIR=$test_artifacts ./ci-scripts/collect-results.sh |& tee "$test_artifacts/collect-results.log"
jq ".metadata.scalability.iteration = ${counter}" "$test_artifacts/benchmark.json" > $$.json
mv -vf $$.json "$test_artifacts/benchmark.json"
(( counter += 1 ))
done
done
done
Expand Down