From 6d75b3fc0941d94ba5787ae6eca1eff02c3f6daa Mon Sep 17 00:00:00 2001 From: skestwal Date: Wed, 1 Oct 2025 17:35:22 +0530 Subject: [PATCH 1/3] refactor(RHIDH-9114): change two variable convention for db and scale replicas to single tuple convention Signed-off-by: skestwal --- ci-scripts/release-tests.sh | 3 +- ci-scripts/scalability/collect-results.sh | 119 ++++++++++----------- ci-scripts/scalability/test-scalability.sh | 103 +++++++++--------- ci-scripts/scalability/test.sh | 2 +- config/cluster_read_config.test.yaml | 3 +- 5 files changed, 111 insertions(+), 119 deletions(-) diff --git a/ci-scripts/release-tests.sh b/ci-scripts/release-tests.sh index a6a967e3..5d1dca0c 100755 --- a/ci-scripts/release-tests.sh +++ b/ci-scripts/release-tests.sh @@ -28,8 +28,7 @@ export SCALE_CATALOG_SIZES='$SCALE_CATALOG_SIZES' export SCALE_CPU_REQUESTS_LIMITS=: export SCALE_DB_STORAGES='$SCALE_DB_STORAGES' export SCALE_MEMORY_REQUESTS_LIMITS=: -export SCALE_RHDH_REPLICAS=1 -export SCALE_RHDH_DB_REPLICAS=1 +export SCALE_REPLICAS=1:1 export SCALE_WORKERS=20 export ENABLE_RBAC=true export SCENARIO=mvp diff --git a/ci-scripts/scalability/collect-results.sh b/ci-scripts/scalability/collect-results.sh index 1ab93566..237b2287 100755 --- a/ci-scripts/scalability/collect-results.sh +++ b/ci-scripts/scalability/collect-results.sh @@ -34,9 +34,7 @@ read -ra rbac_policy_size <<<"${SCALE_RBAC_POLICY_SIZE:-10000}" read -ra catalog_apis_components <<<"${SCALE_CATALOG_SIZES:-1:1 10000:10000}" -read -ra rhdh_replicas <<<"${SCALE_RHDH_REPLICAS:-5}" - -read -ra rhdh_db_replicas <<<"${SCALE_RHDH_DB_REPLICAS:-1}" +read -ra rhdh_replicas <<<"${SCALE_REPLICAS:-1:1}" read -ra db_storages <<<"${SCALE_DB_STORAGES:-1Gi 2Gi}" @@ -51,65 +49,62 @@ echo "Collecting scalability data" counter=1 rhdh_version="" for w in "${workers[@]}"; do - for r in "${rhdh_replicas[@]}"; do - for dbr in "${rhdh_db_replicas[@]}"; do - for bu_bg in "${bs_users_groups[@]}"; do - IFS=":" read -ra tokens <<<"${bu_bg}" - bu="${tokens[0]}" # backstage users - [[ "${#tokens[@]}" == 1 ]] && bg="" || bg="${tokens[1]}" # backstage groups - for rbs in "${rbac_policy_size[@]}"; do - for s in "${db_storages[@]}"; 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-${dbr}dbr-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}" - cr="${tokens[0]}" # cpu requests - [[ "${#tokens[@]}" == 1 ]] && cl="" || cl="${tokens[1]}" # cpu limits - for mr_ml in "${memory_requests_limits[@]}"; do - IFS=":" read -ra tokens <<<"${mr_ml}" - mr="${tokens[0]}" # memory requests - [[ "${#tokens[@]}" == 1 ]] && ml="" || ml="${tokens[1]}" # memory limits - [[ -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-${dbr}dbr-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/${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 - benchmark_json="$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$benchmark_json")" - echo "[$iteration] Gathering data from $benchmark_json" - jq_cmd="\"$((a + c))\" \ - + $csv_delim_quoted + \"${a}\" \ - + $csv_delim_quoted + \"${c}\" \ - + $csv_delim_quoted + (.results.locust_users.max | tostring) \ - + $csv_delim_quoted + (.results.Aggregated.locust_requests_current_rps.mean | tostring) \ - + $csv_delim_quoted + (.results.Aggregated.locust_requests_current_rps.max | tostring) \ - + $csv_delim_quoted + (.results.Aggregated.locust_requests_avg_response_time.mean | tostring) \ - + $csv_delim_quoted + (.results.Aggregated.locust_requests_avg_response_time.max | tostring) \ - + $csv_delim_quoted + (.results.Aggregated.locust_requests_num_failures.max | tostring) \ - + $csv_delim_quoted + (.results.locust_requests_fail_ratio.mean | tostring) \ - + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".used_bytes.max | tostring) \ - + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".available_bytes.min | tostring) \ - + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".capacity_bytes.max | tostring)" - 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' "$benchmark_json" | jq -rc "$jq_cmd" >>"$output" - if [ -z "$rhdh_version" ]; then - rhdh_version=$(jq -r '.metadata.image."konflux.additional-tags" | split(", ") | map(select(test("[0-9]\\.[0-9]-[0-9]+"))) | .[0]' "$benchmark_json" || true) - fi - else - echo "[$iteration] Unable to find benchmark.json" - for _ in $(seq 1 "$(echo "$header" | tr -cd "$csv_delim" | wc -c)"); do - echo -n ";" >>"$output" - done - echo >>"$output" - fi - done + for r_c in "${rhdh_replicas[@]}"; do + IFS=":" read -ra tokens <<<"${r_c}" + r="${tokens[0]}" + for bu_bg in "${bs_users_groups[@]}"; do + IFS=":" read -ra tokens <<<"${bu_bg}" + bu="${tokens[0]}" # backstage users + [[ "${#tokens[@]}" == 1 ]] && bg="" || bg="${tokens[1]}" # backstage groups + for rbs in "${rbac_policy_size[@]}"; do + for s in "${db_storages[@]}"; 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-${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}" + cr="${tokens[0]}" # cpu requests + [[ "${#tokens[@]}" == 1 ]] && cl="" || cl="${tokens[1]}" # cpu limits + for mr_ml in "${memory_requests_limits[@]}"; do + IFS=":" read -ra tokens <<<"${mr_ml}" + mr="${tokens[0]}" # memory requests + [[ "${#tokens[@]}" == 1 ]] && ml="" || ml="${tokens[1]}" # memory limits + [[ -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/${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 + benchmark_json="$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$benchmark_json")" + echo "[$iteration] Gathering data from $benchmark_json" + jq_cmd="\"$((a + c))\" \ + + $csv_delim_quoted + \"${a}\" \ + + $csv_delim_quoted + \"${c}\" \ + + $csv_delim_quoted + (.results.locust_users.max | tostring) \ + + $csv_delim_quoted + (.results.Aggregated.locust_requests_current_rps.mean | tostring) \ + + $csv_delim_quoted + (.results.Aggregated.locust_requests_current_rps.max | tostring) \ + + $csv_delim_quoted + (.results.Aggregated.locust_requests_avg_response_time.mean | tostring) \ + + $csv_delim_quoted + (.results.Aggregated.locust_requests_avg_response_time.max | tostring) \ + + $csv_delim_quoted + (.results.Aggregated.locust_requests_num_failures.max | tostring) \ + + $csv_delim_quoted + (.results.locust_requests_fail_ratio.mean | tostring) \ + + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".used_bytes.max | tostring) \ + + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".available_bytes.min | tostring) \ + + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".capacity_bytes.max | tostring)" + 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' "$benchmark_json" | jq -rc "$jq_cmd" >>"$output" + else + echo "[$iteration] Unable to find benchmark.json" + for _ in $(seq 1 "$(echo "$header" | tr -cd "$csv_delim" | wc -c)"); do + echo -n ";" >>"$output" + done + echo >>"$output" + fi done done done diff --git a/ci-scripts/scalability/test-scalability.sh b/ci-scripts/scalability/test-scalability.sh index cc7567a1..62f479c2 100755 --- a/ci-scripts/scalability/test-scalability.sh +++ b/ci-scripts/scalability/test-scalability.sh @@ -31,9 +31,7 @@ read -ra rbac_policy_size <<<"${SCALE_RBAC_POLICY_SIZE:-10000}" read -ra catalog_apis_components <<<"${SCALE_CATALOG_SIZES:-1:1 10000:10000}" -read -ra rhdh_replicas <<<"${SCALE_RHDH_REPLICAS:-5}" - -read -ra rhdh_db_replicas <<<"${SCALE_RHDH_DB_REPLICAS:-1}" +read -ra rhdh_replicas <<<"${SCALE_REPLICAS:-1:1}" read -ra db_storages <<<"${SCALE_DB_STORAGES:-1Gi 2Gi}" @@ -43,7 +41,7 @@ read -ra memory_requests_limits <<<"${SCALE_MEMORY_REQUESTS_LIMITS:-:}" echo echo "////// RHDH scalability test //////" -echo "Number of scalability matrix iterations: $((${#workers[*]} * ${#active_users_spawn_rate[*]} * ${#bs_users_groups[*]} * ${#catalog_apis_components[*]} * ${#rhdh_replicas[*]} * ${#rhdh_db_replicas[*]} * ${#db_storages[*]} * ${#cpu_requests_limits[*]} * ${#memory_requests_limits[*]}))" +echo "Number of scalability matrix iterations: $((${#workers[*]} * ${#active_users_spawn_rate[*]} * ${#bs_users_groups[*]} * ${#catalog_apis_components[*]} * ${#rhdh_replicas[*]} * ${#db_storages[*]} * ${#cpu_requests_limits[*]} * ${#memory_requests_limits[*]}))" echo wait_for_indexing() { @@ -109,58 +107,59 @@ for w in "${workers[@]}"; do IFS=":" read -ra tokens <<<"${a_c}" a="${tokens[0]}" # apis [[ "${#tokens[@]}" == 1 ]] && c="" || c="${tokens[1]}" # components - for r in "${rhdh_replicas[@]}"; do - for dbr in "${rhdh_db_replicas[@]}"; do - for s in "${db_storages[@]}"; do + for r_c in "${rhdh_replicas[@]}"; do + IFS=":" read -ra tokens <<<"${r_c}" + r="${tokens[0]}" # scale replica + [[ "${#tokens[@]}" == 1 ]] && dbr="" || dbr="${tokens[1]}" # db replica + for s in "${db_storages[@]}"; do + echo + echo "/// Setting up RHDH for scalability test ///" + echo + set -x + export RHDH_DEPLOYMENT_REPLICAS="$r" + export RHDH_DB_REPLICAS="$dbr" + export RHDH_DB_STORAGE="$s" + export RHDH_RESOURCES_CPU_REQUESTS="$cr" + export RHDH_RESOURCES_CPU_LIMITS="$cl" + export RHDH_RESOURCES_MEMORY_REQUESTS="$mr" + export RHDH_RESOURCES_MEMORY_LIMITS="$ml" + export RHDH_KEYCLOAK_REPLICAS="${RHDH_KEYCLOAK_REPLICAS:-$r}" + export BACKSTAGE_USER_COUNT=$bu + export GROUP_COUNT=$bg + export RBAC_POLICY_SIZE="$rbs" + export WORKERS=$w + export API_COUNT=$a + export COMPONENT_COUNT=$c + 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" + 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/${counter}" + mkdir -p "$setup_artifacts" + ARTIFACT_DIR=$setup_artifacts ./ci-scripts/setup.sh 2>&1| tee "$setup_artifacts/setup.log" + wait_for_indexing 2>&1| tee "$setup_artifacts/after-setup-search.log" + for au_sr in "${active_users_spawn_rate[@]}"; do + IFS=":" read -ra tokens <<<"${au_sr}" + au=${tokens[0]} # active users + [[ "${#tokens[@]}" == 1 ]] && sr="" || sr="${tokens[1]}" # spawn rate echo - echo "/// Setting up RHDH for scalability test ///" + echo "/// Running the scalability test ///" echo set -x - export RHDH_DEPLOYMENT_REPLICAS="$r" - export RHDH_DB_REPLICAS="$dbr" - export RHDH_DB_STORAGE="$s" - export RHDH_RESOURCES_CPU_REQUESTS="$cr" - export RHDH_RESOURCES_CPU_LIMITS="$cl" - export RHDH_RESOURCES_MEMORY_REQUESTS="$mr" - export RHDH_RESOURCES_MEMORY_LIMITS="$ml" - export RHDH_KEYCLOAK_REPLICAS="${RHDH_KEYCLOAK_REPLICAS:-$r}" - export BACKSTAGE_USER_COUNT=$bu - export GROUP_COUNT=$bg - export RBAC_POLICY_SIZE="$rbs" - export WORKERS=$w - export API_COUNT=$a - export COMPONENT_COUNT=$c - index="${r}r-${dbr}dbr-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c" + export SCENARIO=${SCENARIO:-search-catalog} + export USERS="${au}" + export DURATION=${DURATION:-5m} + export SPAWN_RATE="${sr}" 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/${counter}" - mkdir -p "$setup_artifacts" - ARTIFACT_DIR=$setup_artifacts ./ci-scripts/setup.sh 2>&1| tee "$setup_artifacts/setup.log" - wait_for_indexing 2>&1| tee "$setup_artifacts/after-setup-search.log" - for au_sr in "${active_users_spawn_rate[@]}"; do - IFS=":" read -ra tokens <<<"${au_sr}" - au=${tokens[0]} # active users - [[ "${#tokens[@]}" == 1 ]] && sr="" || sr="${tokens[1]}" # spawn rate - echo - echo "/// Running the scalability test ///" - echo - set -x - export SCENARIO=${SCENARIO:-search-catalog} - export USERS="${au}" - export DURATION=${DURATION:-5m} - export SPAWN_RATE="${sr}" - set +x - make clean - test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${counter}/${au}u" - mkdir -p "$test_artifacts" - wait_for_indexing 2>&1| tee "$test_artifacts/before-test-search.log" - ARTIFACT_DIR=$test_artifacts ./ci-scripts/test.sh 2>&1| tee "$test_artifacts/test.log" - ARTIFACT_DIR=$test_artifacts ./ci-scripts/collect-results.sh 2>&1| 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 + make clean + test_artifacts="$SCALABILITY_ARTIFACTS/$index/test/${counter}/${au}u" + mkdir -p "$test_artifacts" + wait_for_indexing 2>&1| tee "$test_artifacts/before-test-search.log" + ARTIFACT_DIR=$test_artifacts ./ci-scripts/test.sh 2>&1| tee "$test_artifacts/test.log" + ARTIFACT_DIR=$test_artifacts ./ci-scripts/collect-results.sh 2>&1| 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 diff --git a/ci-scripts/scalability/test.sh b/ci-scripts/scalability/test.sh index e33527d8..543acce5 100755 --- a/ci-scripts/scalability/test.sh +++ b/ci-scripts/scalability/test.sh @@ -8,7 +8,7 @@ SCRIPT_DIR=$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd) # shellcheck disable=SC1090,SC1091 source "$(python3 -c 'import os, sys; print(os.path.realpath(sys.argv[1]))' "$SCRIPT_DIR"/../../test.env)" -export SCENARIO DURATION WAIT_FOR_SEARCH_INDEX PRE_LOAD_DB SCALE_WORKERS SCALE_ACTIVE_USERS_SPAWN_RATES SCALE_BS_USERS_GROUPS SCALE_RBAC_POLICY_SIZE SCALE_CATALOG_SIZES SCALE_RHDH_REPLICAS SCALE_RHDH_DB_REPLICAS SCALE_DB_STORAGES +export SCENARIO DURATION WAIT_FOR_SEARCH_INDEX PRE_LOAD_DB SCALE_WORKERS SCALE_ACTIVE_USERS_SPAWN_RATES SCALE_BS_USERS_GROUPS SCALE_RBAC_POLICY_SIZE SCALE_CATALOG_SIZES SCALE_REPLICAS SCALE_DB_STORAGES echo -e "\n === Running RHDH scalability test ===\n" make test-scalability diff --git a/config/cluster_read_config.test.yaml b/config/cluster_read_config.test.yaml index 42692145..7bc6b834 100644 --- a/config/cluster_read_config.test.yaml +++ b/config/cluster_read_config.test.yaml @@ -92,8 +92,7 @@ 'SCALE_ACTIVE_USERS_SPAWN_RATES', 'SCALE_BS_USERS_GROUPS', 'SCALE_CATALOG_SIZES', - 'SCALE_RHDH_REPLICAS', - 'SCALE_RHDH_DB_REPLICAS', + 'SCALE_REPLICAS', 'SCALE_DB_STORAGES' ] %} - name: metadata.env.{{ var }} From 227799dfe0f2231d19c63cfa1e26fca9ac991b2b Mon Sep 17 00:00:00 2001 From: skestwal Date: Fri, 3 Oct 2025 14:45:27 +0530 Subject: [PATCH 2/3] refactor(RHIDH-9114): change test env to tuple Signed-off-by: skestwal --- test.env | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test.env b/test.env index fbae723e..709ada16 100644 --- a/test.env +++ b/test.env @@ -79,8 +79,7 @@ # export SCALE_BS_USERS_GROUPS="1:1 1000:250" # export SCALE_RBAC_POLICY_SIZE="1 10000" # export SCALE_CATALOG_SIZES="1:1 2500:2500" -# export SCALE_RHDH_REPLICAS="1 2" -# export SCALE_RHDH_DB_REPLICAS="1 2" +# export SCALE_REPLICAS="1:1" # export SCALE_DB_STORAGES="1Gi 2Gi" # export SCALE_CPU_REQUESTS_LIMITS=": 1:1" # export SCALE_MEMORY_REQUESTS_LIMITS=": 1Gi:1Gi" From c40c0c0e76c7c77e18829c728f1170f8788b1caf Mon Sep 17 00:00:00 2001 From: skestwal Date: Mon, 6 Oct 2025 13:54:00 +0530 Subject: [PATCH 3/3] refactor(RHIDH-9114): Keep db replica count for index directory Signed-off-by: skestwal --- ci-scripts/scalability/collect-results.sh | 8 ++++++-- ci-scripts/scalability/test-scalability.sh | 2 +- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ci-scripts/scalability/collect-results.sh b/ci-scripts/scalability/collect-results.sh index 237b2287..983de825 100755 --- a/ci-scripts/scalability/collect-results.sh +++ b/ci-scripts/scalability/collect-results.sh @@ -52,6 +52,7 @@ for w in "${workers[@]}"; do for r_c in "${rhdh_replicas[@]}"; do IFS=":" read -ra tokens <<<"${r_c}" r="${tokens[0]}" + [[ "${#tokens[@]}" == 1 ]] && dbr="" || dbr="${tokens[1]}" for bu_bg in "${bs_users_groups[@]}"; do IFS=":" read -ra tokens <<<"${bu_bg}" bu="${tokens[0]}" # backstage users @@ -61,7 +62,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-${counter}.csv" + output="$ARTIFACT_DIR/scalability_c-${r}r-${dbr}dbr-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}" @@ -76,7 +77,7 @@ for w in "${workers[@]}"; 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" + index="${r}r-${dbr}dbr-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/${counter}/${active_users}u" (( counter += 1 )) echo "[$iteration] Looking for benchmark.json..." @@ -98,6 +99,9 @@ for w in "${workers[@]}"; do + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".available_bytes.min | tostring) \ + $csv_delim_quoted + (.measurements.cluster.pv_stats.test.\"rhdh-postgresql\".capacity_bytes.max | tostring)" 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' "$benchmark_json" | jq -rc "$jq_cmd" >>"$output" + if [ -z "$rhdh_version" ]; then + rhdh_version=$(jq -r '.metadata.image."konflux.additional-tags" | split(", ") | map(select(test("[0-9]\\.[0-9]-[0-9]+"))) | .[0]' "$benchmark_json" || true) + fi else echo "[$iteration] Unable to find benchmark.json" for _ in $(seq 1 "$(echo "$header" | tr -cd "$csv_delim" | wc -c)"); do diff --git a/ci-scripts/scalability/test-scalability.sh b/ci-scripts/scalability/test-scalability.sh index 62f479c2..2f79f5e1 100755 --- a/ci-scripts/scalability/test-scalability.sh +++ b/ci-scripts/scalability/test-scalability.sh @@ -130,7 +130,7 @@ for w in "${workers[@]}"; do export WORKERS=$w export API_COUNT=$a export COMPONENT_COUNT=$c - 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" + index="${r}r-${dbr}dbr-db_${s}-${bu}bu-${bg}bg-${rbs}rbs-${w}w-${cr}cr-${cl}cl-${mr}mr-${ml}ml-${a}a-${c}c" set +x oc login "$OPENSHIFT_API" -u "$OPENSHIFT_USERNAME" -p "$OPENSHIFT_PASSWORD" --insecure-skip-tls-verify=true make clean-local undeploy-rhdh