Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
YassinEldeeb committed Nov 27, 2024
1 parent 7407890 commit d22750c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/baseline_http_bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit d22750c

Please sign in to comment.