Skip to content

Commit

Permalink
update ispn
Browse files Browse the repository at this point in the history
Signed-off-by: Kamesh Akella <[email protected]>
  • Loading branch information
kami619 committed Aug 12, 2024
1 parent a175fa5 commit acad030
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 9 deletions.
30 changes: 23 additions & 7 deletions .github/actions/prometheus-metrics-calc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,17 @@ runs:
run: |
readarray -t lines < ${{ inputs.input }}
num1=${lines[0]}
num2=${lines[1]}
num2=${lines[2]}
num3=${lines[1]}
num4=${lines[3]}
#calculating the difference of cumulative metric (changed during the benchmark execution)
difference=$(awk "BEGIN {print ($num2-$num1); exit}")
difference_cluster_1=$(awk "BEGIN {print ($num2 - $num1); exit}")
difference_cluster_2=$(awk "BEGIN {print ($num4 - $num3); exit}")
# averaging the differences between the two clusters
average_difference=$(awk "BEGIN {print ($difference_cluster_1 + $difference_cluster_2) / 2; exit}")
#calculating the average metric per pod
metric_per_pod=$(awk "BEGIN {print $difference/$POD_NUM; exit}")
metric_per_pod=$(awk "BEGIN {print $average_difference/$POD_NUM; exit}")
#Calculating the final number, i.e. based on current environment setup how many of specified criteria (e.g. user active session, etc)
#can be handled with 500Mb per pod based on the number calculated above. The result is number rounded down.
result=$(awk "BEGIN {print int($CRITERIA_VALUE*500/$metric_per_pod); exit}")
Expand Down Expand Up @@ -107,15 +113,25 @@ runs:
#Reading ispn metrics file with xsite reqs data
readarray -t lines < "${{ inputs.ispnCacheName}}_ispn_metrics_file_count"
num1=${lines[0]}
num2=${lines[1]}
num2=${lines[2]}
num3=${lines[1]}
num4=${lines[3]}
#calculating the number of xsite requests during the test execution
xsite_reqs=$(awk "BEGIN {print ($num2-$num1); exit}")
xsite_reqs_1=$(awk "BEGIN {print ($num2 - $num1); exit}")
xsite_reqs_2=$(awk "BEGIN {print ($num4 - $num3); exit}")
xsite_reqs=$(awk "BEGIN {print ($xsite_reqs_1 + $xsite_reqs_2) / 2; exit}")
#Reading ispn metrics file with xsite reqs totad duration
readarray -t lines1 < "${{ inputs.ispnCacheName}}_ispn_metrics_file_sum"
num1=${lines1[0]}
num2=${lines1[1]}
num2=${lines1[2]}
num3=${lines1[1]}
num4=${lines1[3]}
#calculating the number of xsite requests during the test execution
xsite_reqs_total_duration=$(awk "BEGIN {print ($num2-$num1); exit}")
xsite_reqs_total_duration_1=$(awk "BEGIN {print ($num2 - $num1); exit}")
xsite_reqs_total_duration_2=$(awk "BEGIN {print ($num4 - $num3); exit}")
xsite_reqs_total_duration=$(awk "BEGIN {print ($xsite_reqs_total_duration_1 + $xsite_reqs_total_duration_2) / 2; exit}")
#calculating the average duration per request in ms
if [[ $xsite_reqs -gt 0 ]]; then
averageXsiteReplicationTimePerReq=$(awk "BEGIN {print int($xsite_reqs_total_duration*1000/$xsite_reqs); exit}")
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/rosa-scaling-benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,19 @@ jobs:
with:
createReportFile: true

- name: Run Memory Usage Total Query Before Benchmark
- name: Run Memory Usage Total Query Before Benchmark on Cluster 1
uses: ./.github/actions/prometheus-run-queries
with:
project: ${{ env.PROJECT }}
runMemoryUsageTotal: true
output: memory_create_sessions

- name: Login to OpenShift cluster 2
uses: ./.github/actions/oc-keycloak-login
with:
clusterName: ${{ inputs.clusterPrefix }}-b

- name: Run Memory Usage Total Query Before Benchmark on Cluster 2
uses: ./.github/actions/prometheus-run-queries
with:
project: ${{ env.PROJECT }}
Expand All @@ -211,7 +223,24 @@ jobs:
continue-on-error: true
working-directory: ansible

- name: Run Memory Usage Total Query After Benchmark
- name: Login to OpenShift cluster 1
uses: ./.github/actions/oc-keycloak-login
with:
clusterName: ${{ inputs.clusterPrefix }}-a

- name: Run Memory Usage Total Query After Benchmark on Cluster 1
uses: ./.github/actions/prometheus-run-queries
with:
project: ${{ env.PROJECT }}
runMemoryUsageTotal: true
output: memory_create_sessions

- name: Login to OpenShift cluster 2
uses: ./.github/actions/oc-keycloak-login
with:
clusterName: ${{ inputs.clusterPrefix }}-b

- name: Run Memory Usage Total Query After Benchmark on Cluster 2
uses: ./.github/actions/prometheus-run-queries
with:
project: ${{ env.PROJECT }}
Expand All @@ -235,6 +264,11 @@ jobs:
isvCPU: false
isMemory: true

- name: Login to OpenShift cluster 1
uses: ./.github/actions/oc-keycloak-login
with:
clusterName: ${{ inputs.clusterPrefix }}-a

- name: Run CPU sec Util Query Before Benchmark on Cluster 1
uses: ./.github/actions/prometheus-run-queries
with:
Expand Down

0 comments on commit acad030

Please sign in to comment.