Skip to content
This repository was archived by the owner on Mar 18, 2025. It is now read-only.

Commit 7925839

Browse files
committed
fix
1 parent d22750c commit 7925839

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

.github/workflows/baseline_http_bench.yaml

+9-8
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,19 @@ jobs:
7676
- name: Generate Markdown Report
7777
id: generate-report
7878
run: |
79+
# Extract values from JSON
7980
ACTIX_RPS=$(jq '.metrics.http_reqs.rate' actix_results.json)
80-
ACTIX_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // "null"' actix_results.json)
81+
ACTIX_P95=$(jq '.metrics.http_req_duration["p(95)"]' actix_results.json)
8182
CONDUCTOR_RPS=$(jq '.metrics.http_reqs.rate' conductor_results.json)
82-
CONDUCTOR_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"] // "null"' conductor_results.json)
83+
CONDUCTOR_P95=$(jq '.metrics.http_req_duration["p(95)"]' conductor_results.json)
8384
84-
# Handle rounding or fallback to "N/A"
85-
ACTIX_RPS_ROUNDED=$(printf "%.0f" $ACTIX_RPS)
86-
ACTIX_P95_ROUNDED=$(if [[ $ACTIX_P95 == "null" ]]; then echo "N/A"; else printf "%.0f" $ACTIX_P95; fi)
87-
CONDUCTOR_RPS_ROUNDED=$(printf "%.0f" $CONDUCTOR_RPS)
88-
CONDUCTOR_P95_ROUNDED=$(if [[ $CONDUCTOR_P95 == "null" ]]; then echo "N/A"; else printf "%.0f" $CONDUCTOR_P95; fi)
85+
# Handle potential nulls or missing values
86+
ACTIX_RPS_ROUNDED=$(printf "%.0f" ${ACTIX_RPS:-0})
87+
ACTIX_P95_ROUNDED=$(printf "%.0f" ${ACTIX_P95:-0})
88+
CONDUCTOR_RPS_ROUNDED=$(printf "%.0f" ${CONDUCTOR_RPS:-0})
89+
CONDUCTOR_P95_ROUNDED=$(printf "%.0f" ${CONDUCTOR_P95:-0})
8990
90-
# Generate the Markdown report
91+
# Generate Markdown report
9192
echo "## Benchmark Results" > benchmark_results.md
9293
echo "| Implementation | Requests/sec | P95 Latency (ms) |" >> benchmark_results.md
9394
echo "|----------------|--------------|------------------|" >> benchmark_results.md

0 commit comments

Comments
 (0)