40
40
wait-for : 5m
41
41
log-output-if : failure
42
42
log-output : true
43
+
43
44
# Benchmark Actix Web with k6
44
45
- name : Benchmark Actix Web
45
46
run : |
49
50
- name : Stop Actix Web Server
50
51
run : pkill -f actix_web_server || true
51
52
53
+
52
54
# Build and run Conductor server in the background
53
55
- name : Run Conductor Server
54
56
uses : JarvusInnovations/background-action@v1
60
62
log-output-if : failure
61
63
log-output : true
62
64
65
+ - name : Cooldown Period
66
+ run : |
67
+ echo "Cooling down for 30 seconds..."
68
+ sleep 30
69
+
63
70
# Benchmark Conductor with k6
64
71
- name : Benchmark Conductor
65
72
run : |
@@ -70,17 +77,20 @@ jobs:
70
77
id : generate-report
71
78
run : |
72
79
ACTIX_RPS=$(jq '.metrics.http_reqs.rate' actix_results.json)
73
- ACTIX_P95=$(jq '.metrics.http_req_duration[" percentiles"] ["95.0"]' actix_results.json)
80
+ ACTIX_P95=$(jq '.metrics.http_req_duration. percentiles["95.0"]' actix_results.json)
74
81
CONDUCTOR_RPS=$(jq '.metrics.http_reqs.rate' conductor_results.json)
75
- CONDUCTOR_P95=$(jq '.metrics.http_req_duration["percentiles"]["95.0"]' conductor_results.json)
82
+ CONDUCTOR_P95=$(jq '.metrics.http_req_duration.percentiles["95.0"]' conductor_results.json)
83
+
84
+ ACTIX_RPS_ROUNDED=$(printf "%.0f" $ACTIX_RPS)
85
+ ACTIX_P95_ROUNDED=$(printf "%.0f" ${ACTIX_P95:-0})
86
+ CONDUCTOR_RPS_ROUNDED=$(printf "%.0f" $CONDUCTOR_RPS)
87
+ CONDUCTOR_P95_ROUNDED=$(printf "%.0f" ${CONDUCTOR_P95:-0})
76
88
77
89
echo "## Benchmark Results" > benchmark_results.md
78
90
echo "| Implementation | Requests/sec | P95 Latency (ms) |" >> benchmark_results.md
79
91
echo "|----------------|--------------|------------------|" >> benchmark_results.md
80
- echo "| Actix Web | $ACTIX_RPS | $ACTIX_P95 |" >> benchmark_results.md
81
- echo "| Conductor | $CONDUCTOR_RPS | $CONDUCTOR_P95 |" >> benchmark_results.md
82
-
83
- cat benchmark_results.md
92
+ echo "| Actix Web | $ACTIX_RPS_ROUNDED | $ACTIX_P95_ROUNDED |" >> benchmark_results.md
93
+ echo "| Conductor | $CONDUCTOR_RPS_ROUNDED | $CONDUCTOR_P95_ROUNDED |" >> benchmark_results.md
84
94
85
95
# Post Comment on PR
86
96
- name : Comment on Pull Request
0 commit comments