[AZ-1124] Add PT-10 gRPC stream perf scenario
ci/woodpecker/push/01-test Pipeline failed
ci/woodpecker/push/02-build-push unknown status

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-06-26 11:26:14 +03:00
parent a0449f79d0
commit 7dac986996
15 changed files with 598 additions and 11 deletions
@@ -73,3 +73,14 @@
**Pass criterion**: `p95(durations[20]) ≤ 1000ms` (samples sorted ascending; p95 = `sorted[18]` over 20 samples per the test). Cycle 6 measured: `min=13ms, median=19ms, p95=66ms, max=117ms` — well under budget.
**Source**: AZ-505 AC-4 — `_docs/02_tasks/done/AZ-505_tile_inventory_http2_leaflet_index.md` § Acceptance Criteria. Resolves the AZ-503 AC-9 perf NFR deferral (budget relaxed from 500 ms to 1000 ms during AZ-505 scoping — see AZ-505 Risk 1 in the task spec).
**Note (promotion to perf harness)**: The in-test gate runs against the same Docker compose stack as the rest of the integration suite, so the perf budget is verified on the same hardware as functional tests. If we ever need to tighten the budget (e.g., to 500 ms for production-equivalent hardware) or add cross-commit baseline comparison like PT-07, promote this to `scripts/run-performance-tests.sh § PT-09` with a `PERF_INVENTORY_BATCH_SIZE` env variable controlling the row count and a separate cold/warm distinction.
## PT-10: gRPC DeliverRouteTiles Stream Latency
**Status**: **Implemented (AZ-1124).** Runner scenario: `scripts/run-performance-tests.sh` § "PT-10".
**Trigger**: `RouteTileDelivery.DeliverRouteTiles` server-streaming RPC over gRPC (TLS + JWT metadata) against a live API. Invoked via `SatelliteProvider.IntegrationTests --run-pt10`, which reuses `GrpcTestHelpers`, `PerfBootstrap` JWT mint, and the standard 2-waypoint / 500 m / zoom-18 fixture.
**Load**: `PERF_REPEAT_COUNT` sequential cold iterations (default 20) plus one slow-consumer iteration with `PERF_PT10_SLOW_MS` delay between stream events (default 50 ms).
**Expected**: First `Batch` event arrives within the cold-path GM budget; full stream completes with `DeliveryComplete`; slow consumer completes without `DeliveryError`.
**Pass criterion**: `p95(first_batch_ms) ≤ 30000`, `p95(total_stream_ms) ≤ 120000`, and slow-consumer sub-check passes (no fixed ms threshold). Threshold failures exit non-zero; autodev Step 15 may offer override.
**Source**: Cycle 911 retro carry-over — gRPC functional coverage (AZ-1074/1075 / BT-32) without streaming NFR evidence; closes the Unverified gRPC perf gap.
**Note**: Cold iterations may include Google Maps download on the first pass over a fresh compose volume; record actuals in `_docs/06_metrics/perf_<date>.md`. Host-side runs require `API_URL=https://localhost:18980` (or perf overlay port) and trust `./certs/api.crt` via `PROJECT_ROOT` (same as REST perf probes).