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:
2026-05-09 10:35:45 -04:00
parent d2097d8930
commit 8506fd17ef
8 changed files with 113 additions and 31 deletions

View File

@@ -8,7 +8,22 @@ const enrollmentLatency = new Trend('enrollment_p99');
const verificationLatency = new Trend('verification_p99');
const modelLatency = new Trend('model_retrieval_p99');
const TARGET_RPS = getTargetRps();
const DURATION = getDuration();
export const options = {
scenarios: {
sustained_load: {
executor: 'constant-arrival-rate',
duration: DURATION,
rate: TARGET_RPS,
preAllocatedVUs: 20,
maxVUs: 100,
startTime: '0s',
exec: 'default',
tags: { scenario: 'sustained_load' },
},
},
thresholds: {
...defaultThresholds(250).thresholds,
enrollment_p99: ['p(99)<500'],