Fix load test scenarios, runner, and CI threshold checks
- Add constant-arrival-rate scenarios to all 4 service scripts (api,
darkwatch, spamshield, voiceprint) to enforce 500 req/s target
- Fix defaultThresholds() to return { thresholds: {...} } so
http_req_duration and errors thresholds are actually applied
- Rewrite run-all.sh: per-service summary files, proper env var
passing (DURATION, API_TOKEN), fixed threshold aggregation
- Update CI workflow threshold check jq to match new threshold-results
structure (.services.<name>.exitCode)
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
11
.github/workflows/ci.yml
vendored
11
.github/workflows/ci.yml
vendored
@@ -217,14 +217,13 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f scripts/load-test/reports/threshold-results.json ]; then
|
||||
FAILURES=$(jq -r '.metrics | to_entries[] | select(.value.passes == false) | .key' scripts/load-test/reports/threshold-results.json)
|
||||
if [ -n "$FAILURES" ]; then
|
||||
echo "❌ P99 threshold failures:"
|
||||
echo "$FAILURES"
|
||||
FAILURES=$(jq -r '[.services | to_entries[] | select(.value.exitCode != 0) | .key] | join(", ")' scripts/load-test/reports/threshold-results.json 2>/dev/null || echo "")
|
||||
if [ -n "$FAILURES" ] && [ "$FAILURES" != "" ]; then
|
||||
echo "❌ Load test failures: $FAILURES"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All P99 thresholds passed"
|
||||
echo "✅ All load tests passed"
|
||||
fi
|
||||
else
|
||||
echo "No threshold results file found"
|
||||
echo "⚠️ No threshold results file found"
|
||||
fi
|
||||
|
||||
11
.github/workflows/load-test.yml
vendored
11
.github/workflows/load-test.yml
vendored
@@ -64,14 +64,13 @@ jobs:
|
||||
if: always()
|
||||
run: |
|
||||
if [ -f scripts/load-test/reports/threshold-results.json ]; then
|
||||
FAILURES=$(jq -r '.metrics | to_entries[] | select(.value.passes == false) | .key' scripts/load-test/reports/threshold-results.json 2>/dev/null || echo "")
|
||||
if [ -n "$FAILURES" ]; then
|
||||
echo "❌ P99 threshold failures:"
|
||||
echo "$FAILURES"
|
||||
FAILURES=$(jq -r '[.services | to_entries[] | select(.value.exitCode != 0) | .key] | join(", ")' scripts/load-test/reports/threshold-results.json 2>/dev/null || echo "")
|
||||
if [ -n "$FAILURES" ] && [ "$FAILURES" != "" ]; then
|
||||
echo "❌ Load test failures: $FAILURES"
|
||||
exit 1
|
||||
else
|
||||
echo "✅ All P99 thresholds passed"
|
||||
echo "✅ All load tests passed"
|
||||
fi
|
||||
else
|
||||
echo "No threshold results file found"
|
||||
echo "⚠️ No threshold results file found"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user