diff --git a/.github/workflows/baseline_http_bench.yaml b/.github/workflows/baseline_http_bench.yaml index 7036f7e4..9ebd2979 100644 --- a/.github/workflows/baseline_http_bench.yaml +++ b/.github/workflows/baseline_http_bench.yaml @@ -77,15 +77,15 @@ jobs: id: generate-report run: | ACTIX_RPS=$(jq '.metrics.http_reqs.rate' actix_results.json) - ACTIX_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // 0' actix_results.json) + ACTIX_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // "null"' actix_results.json) CONDUCTOR_RPS=$(jq '.metrics.http_reqs.rate' conductor_results.json) - CONDUCTOR_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // 0' conductor_results.json) + CONDUCTOR_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // "null"' conductor_results.json) - # Round the results to whole numbers + # Handle rounding or fallback to "N/A" ACTIX_RPS_ROUNDED=$(printf "%.0f" $ACTIX_RPS) - ACTIX_P95_ROUNDED=$(printf "%.0f" $ACTIX_P95) + ACTIX_P95_ROUNDED=$(if [[ $ACTIX_P95 == "null" ]]; then echo "N/A"; else printf "%.0f" $ACTIX_P95; fi) CONDUCTOR_RPS_ROUNDED=$(printf "%.0f" $CONDUCTOR_RPS) - CONDUCTOR_P95_ROUNDED=$(printf "%.0f" $CONDUCTOR_P95) + CONDUCTOR_P95_ROUNDED=$(if [[ $CONDUCTOR_P95 == "null" ]]; then echo "N/A"; else printf "%.0f" $CONDUCTOR_P95; fi) # Generate the Markdown report echo "## Benchmark Results" > benchmark_results.md