# NFT-PERF-02 — Frame-by-frame streaming (no batching)

**Task**: AZ-429_nft_perf_02_streaming
**Name**: Estimates streamed frame-by-frame; no batching/delay (AC-4.4)
**Description**: Implement NFT-PERF-02 — replay Derkachi 5 min at 3 Hz; observe inter-emit interval at SITL; assert p95 inter-emit ≤ inter-frame × 1.05 (≤350 ms at 3 Hz target); no window of ≥3 missed-emit gaps.
**Complexity**: 2 points
**Dependencies**: AZ-406, AZ-407
**Component**: Blackbox Tests / Performance (epic AZ-262)
**Tracker**: AZ-429
**Epic**: AZ-262 (E-BBT)

## Problem

Frame-by-frame streaming (vs hidden batching) is an AC-4.4 contract — the operator UX assumes a steady cadence. Easy to validate via inter-emit interval distribution.

## Outcome

- pytest scenario at `e2e/tests/performance/test_nft_perf_02_streaming.py`. Tier-1 OR Tier-2.
- 5 min Derkachi replay at 3 Hz target; SITL-side inter-emit interval distribution; assert p95 ≤ 350 ms (inter-frame × 1.05); no window of ≥3 consecutive missed emits.

## Scope

### Included
- Inter-emit interval measurement at SITL.
- p95 assertion + missed-emit-window assertion.

### Excluded
- End-to-end latency (`t_capture → t_emit`) — owned by NFT-PERF-01.

## Acceptance Criteria

**AC-1: p95 inter-emit ≤ 350 ms**
Given the 5 min replay at 3 Hz target
Then `p95(inter_emit_interval) ≤ 350 ms`.

**AC-2: no ≥3-emit gap**
Given the inter-emit stream
Then no window contains ≥3 consecutive missed emits (a "missed emit" is an interval > 2 × target = 666 ms at 3 Hz).

**AC-3: parameterization**
Given conftest parameterization
Then the scenario runs per `(fc_adapter, vio_strategy)` on both tiers.

## System Under Test Boundary

End-to-end through public boundaries.

- **Allowed**: SITL receipt timestamps.
- **Forbidden**: importing SUT scheduler internals.

## Constraints

- "Inter-emit interval" is the SITL-side timestamp delta between consecutive accepted GPS_INPUT / MSP2_SENSOR_GPS messages.

## Document Dependencies

- `_docs/02_document/tests/performance-tests.md` § NFT-PERF-02
- `_docs/02_document/tests/test-data.md` § Performance (NFT-PERF-02 row)
