mirror of
https://github.com/azaion/satellite-provider.git
synced 2026-06-27 08:31:13 +00:00
[AZ-1124] Add PT-10 gRPC stream perf scenario
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env bash
|
||||
# Satellite Provider Performance Tests
|
||||
#
|
||||
# Runs PT-01..PT-08 against a live API. All probes carry a Bearer token minted
|
||||
# Runs PT-01..PT-10 against a live API. All probes carry a Bearer token minted
|
||||
# from JWT_SECRET (AZ-487 required RequireAuthorization on every endpoint;
|
||||
# without the header every probe returns 401).
|
||||
#
|
||||
@@ -20,6 +20,7 @@ PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
|
||||
API_URL="${API_URL:-https://localhost:18980}"
|
||||
PERF_REPEAT_COUNT="${PERF_REPEAT_COUNT:-20}"
|
||||
PERF_UAV_BATCH_SIZE="${PERF_UAV_BATCH_SIZE:-10}"
|
||||
PERF_PT10_SLOW_MS="${PERF_PT10_SLOW_MS:-50}"
|
||||
|
||||
# AZ-505 dev TLS: the dev compose stack now binds Kestrel on https://+:8080 with
|
||||
# a self-signed cert (./certs/api.crt) so ALPN can negotiate HTTP/2. Every curl
|
||||
@@ -464,6 +465,40 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- PT-10: gRPC DeliverRouteTiles stream latency ---
|
||||
|
||||
echo ""
|
||||
echo "PT-10: gRPC DeliverRouteTiles stream latency (N=${PERF_REPEAT_COUNT}, slow_ms=${PERF_PT10_SLOW_MS})"
|
||||
|
||||
export PROJECT_ROOT
|
||||
PT10_STDERR="$PERF_TMP_DIR/pt10_stderr.log"
|
||||
if ! PT10_LINES=$(dotnet "$PERF_DLL" --run-pt10 2>"$PT10_STDERR"); then
|
||||
echo " ✗ PT-10: --run-pt10 failed"
|
||||
cat "$PT10_STDERR" >&2 || true
|
||||
FAIL=$((FAIL + 1))
|
||||
else
|
||||
cat "$PT10_STDERR" >&2 || true
|
||||
eval "$(printf '%s\n' "$PT10_LINES" | grep '^PT10_')"
|
||||
|
||||
if [[ -z "${PT10_FIRST_BATCH_P95:-}" || -z "${PT10_TOTAL_STREAM_P95:-}" ]]; then
|
||||
echo " ✗ PT-10: missing metric lines on stdout"
|
||||
echo "$PT10_LINES"
|
||||
FAIL=$((FAIL + 1))
|
||||
else
|
||||
echo " first_batch: p50=${PT10_FIRST_BATCH_P50}ms p95=${PT10_FIRST_BATCH_P95}ms (N=${PT10_ITERATIONS_OK:-0})"
|
||||
echo " total_stream: p50=${PT10_TOTAL_STREAM_P50}ms p95=${PT10_TOTAL_STREAM_P95}ms (N=${PT10_ITERATIONS_OK:-0})"
|
||||
check_threshold "PT-10 first_batch p95" "$PT10_FIRST_BATCH_P95" 30000
|
||||
check_threshold "PT-10 total_stream p95" "$PT10_TOTAL_STREAM_P95" 120000
|
||||
if [[ "${PT10_SLOW_CONSUMER:-FAIL}" == "PASS" ]]; then
|
||||
echo " ✓ PT-10 slow-consumer: PASS (delay=${PERF_PT10_SLOW_MS}ms)"
|
||||
PASS=$((PASS + 1))
|
||||
else
|
||||
echo " ✗ PT-10 slow-consumer: FAIL"
|
||||
FAIL=$((FAIL + 1))
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# --- Summary ---
|
||||
|
||||
echo ""
|
||||
|
||||
Reference in New Issue
Block a user