Skip to content

Commit

Permalink
[Horreum] Infinispan metric calculation sometimes results to division…
Browse files Browse the repository at this point in the history
… to 0

Closes #832

Signed-off-by: Anna Manukyan <[email protected]>
Co-authored-by: Anna Manukyan <[email protected]>
  • Loading branch information
andyuk1986 and Anna Manukyan committed May 28, 2024
1 parent f95fcec commit 6daa6a8
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions .github/actions/prometheus-metrics-calc/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ runs:
mv tmp.json ${HORREUM_OUTPUT_FILE_NAME}
#Removing ispn metrics file for next execution
rm "${{ inputs.ispnCacheName}}_ispn_metrics_file_count"
rm "${{ inputs.ispnCacheName}}_ispn_metrics_file_sum"
- id: gatling-report-parse-and-store
name: Parses gatling report and stores got information in JSON file.
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/prometheus-run-queries/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ runs:
# language=bash
run: |
curl -s -H "Authorization: Bearer $OC_TOKEN" -k "https://$THANOS_HOST/api/v1/query" --data-urlencode \
"query=avg(vendor_rpc_manager_cross_site_replication_times_seconds_sum{job='infinispan-admin', namespace='${{ inputs.project }}',container='infinispan', cache='${{ inputs.ispnCacheName }}'})" \
"query=round(avg(vendor_rpc_manager_cross_site_replication_times_seconds_sum{job='infinispan-admin', namespace='${{ inputs.project }}',container='infinispan', cache='${{ inputs.ispnCacheName }}'}))" \
| jq '.data.result[0].value[1]' -r >> "${{ inputs.ispnCacheName}}_ispn_metrics_file_sum"
curl -s -H "Authorization: Bearer $OC_TOKEN" -k "https://$THANOS_HOST/api/v1/query" --data-urlencode \
"query=avg(vendor_rpc_manager_cross_site_replication_times_seconds_count{job='infinispan-admin', namespace='${{ inputs.project }}',container='infinispan', cache='${{ inputs.ispnCacheName }}'})" \
"query=round(avg(vendor_rpc_manager_cross_site_replication_times_seconds_count{job='infinispan-admin', namespace='${{ inputs.project }}',container='infinispan', cache='${{ inputs.ispnCacheName }}'}))" \
| jq '.data.result[0].value[1]' -r >> "${{ inputs.ispnCacheName}}_ispn_metrics_file_count"
env:
THANOS_HOST: ${{ env.THANOS_HOST }}
Expand Down

0 comments on commit 6daa6a8

Please sign in to comment.