docs: record 120-client SSE load, train and fallback results
Add staffing timing to the integration harness and commit the verified run: small train 171ms, forecast train 3.6s, SSE propagation 15ms, 120/120 clients for 300s with 0 drops and p95 5.6ms, 20 heartbeats at 15s, FastAPI-down fallback from the snapshot, and recovery in 1.6s.
This commit is contained in:
1 parent
ac7ceca7ec
commit
b3146e0862
15 files changed
+481
-1
No files matched your search
@@ -229,6 +229,22 @@ if [[ "$RUN_FORECAST" == "1" ]]; then
|
||||
ok "Go /api/meta model_version refreshed to $JOB_VERSION"
|
||||
fi
|
||||
|
||||
# ------------------------------------------------------------------ staffing
|
||||
log "timing staffing plan generation (contract: <2s)"
|
||||
staffing_url="$API_URL/api/staffing?sensor=hn-stadtgalerie-01&scenario=base&standard=standard"
|
||||
staffing_cold=$(curl -sS -m 10 -o "$WORKDIR/staffing-live.json" -w '%{time_total}' "$staffing_url")
|
||||
staffing_warm=$(curl -sS -m 10 -o "$WORKDIR/staffing-warm.json" -w '%{time_total}' "$staffing_url")
|
||||
[[ "$(json_get "$WORKDIR/staffing-live.json" '.hours | length')" == "70" ]] || fail "staffing plan does not cover 7 days x 10 store hours"
|
||||
[[ "$(json_get "$WORKDIR/staffing-live.json" '.cached')" == "false" ]] || fail "live staffing plan is marked cached"
|
||||
staffing_cold_ms=$(awk -v s="$staffing_cold" 'BEGIN { printf "%d", s*1000 }')
|
||||
staffing_warm_ms=$(awk -v s="$staffing_warm" 'BEGIN { printf "%d", s*1000 }')
|
||||
(( staffing_cold_ms < 2000 )) || fail "staffing cold plan took ${staffing_cold_ms}ms (>=2s)"
|
||||
ok "staffing: cold ${staffing_cold_ms}ms, cached ${staffing_warm_ms}ms, 70 hours, coverage=$(json_get "$WORKDIR/staffing-live.json" '.summary.coverage_pct')%"
|
||||
jq -n --argjson cold_ms "$staffing_cold_ms" --argjson warm_ms "$staffing_warm_ms" \
|
||||
--slurpfile plan "$WORKDIR/staffing-live.json" \
|
||||
'{cold_ms:$cold_ms, warm_ms:$warm_ms, hours:($plan[0].hours|length), shifts:($plan[0].shifts|length), coverage_pct:$plan[0].summary.coverage_pct, cost_eur:$plan[0].summary.cost_eur, cached:$plan[0].cached}' \
|
||||
> "$RESULTS_DIR/staffing.json"
|
||||
|
||||
# -------------------------------------------------------------- SSE scenario
|
||||
log "checking SSE scenario propagation, heartbeat and reconnect"
|
||||
sse_log="$RESULTS_DIR/sse-stream.log"
|
||||
@@ -405,6 +421,7 @@ PulseCast Go integration $(date -u +%Y-%m-%dT%H:%M:%SZ)
|
||||
FastAPI $ML_URL, Go $API_URL
|
||||
small CSV: $small_rows rows ($SMALL_FROM .. $SMALL_TO)
|
||||
small job: $(jq -r '"status=\(.job.status) version=\(.job.model_version) accuracy=\(.job.metrics.accuracy) roc_auc=\(.job.metrics.roc_auc) submit_to_terminal_ms=\(.submit_to_terminal_ms)"' "$RESULTS_DIR/train-small.json")
|
||||
staffing: $(jq -r '"cold_ms=\(.cold_ms) warm_ms=\(.warm_ms) hours=\(.hours) coverage_pct=\(.coverage_pct) cost_eur=\(.cost_eur)"' "$RESULTS_DIR/staffing.json")
|
||||
SSE: $(jq -c '.' "$RESULTS_DIR/sse.json")
|
||||
fallback: $(jq -c '.' "$RESULTS_DIR/fallback.json")
|
||||
EOF
|
||||
|
||||
Reference in new issue
Block a user