From ff13779251e0a3082e10ea7b5ed0be773ce149a7 Mon Sep 17 00:00:00 2001 From: skordas Date: Tue, 15 Oct 2024 13:54:46 -0400 Subject: [PATCH] Sum of values from all instances. --- tests/perfscale-sizing-recommendation/check_metrics.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/perfscale-sizing-recommendation/check_metrics.sh b/tests/perfscale-sizing-recommendation/check_metrics.sh index 1fe66d3..3662e04 100755 --- a/tests/perfscale-sizing-recommendation/check_metrics.sh +++ b/tests/perfscale-sizing-recommendation/check_metrics.sh @@ -14,7 +14,7 @@ query="$metric" count=0 response=$(curl -s -k -H "Authorization: Bearer $TOKEN" -H "Content-type: application/json" "https://$THANOS_QUERIER_HOST/api/v1/query?query=$query") time=$(echo "$response" | jq -r '.data.result[0].value[0]') - count=$(echo "$response" | jq -r '.data.result[0].value[1]') + count=$(echo "$response" | jq -r '[.data.result[].value[1] | tonumber] | add') echo "$time;$count" >> $metric.log echo "Metric: $metric: $count" done