[AZ-178] Add real-video streaming test, update e2e tests, mark task done

- Add tests/test_az178_realvideo_streaming.py: integration test that validates
  frame decoding begins while upload is still in progress using a real video fixture
- Add conftest.py: pytest plugin for per-test duration reporting
- Update e2e tests (async_sse, performance, security, streaming_video_upload, video)
  and run-tests.sh for updated test suite
- Move AZ-178 task to done/; add data/ to .gitignore (StreamingBuffer temp files)
- Update autopilot state to step 12 (Security Audit) for new feature cycle

Made-with: Cursor
This commit is contained in:
Oleksandr Bezdieniezhnykh
2026-04-01 05:02:25 +03:00
parent be4cab4fcb
commit 07c2afb62e
11 changed files with 142 additions and 261 deletions
+6 -8
View File
@@ -17,8 +17,7 @@ def _percentile_ms(sorted_ms, p):
return sorted_ms[lo] * (1 - w) + sorted_ms[hi] * w
@pytest.mark.slow
@pytest.mark.timeout(300)
@pytest.mark.timeout(60)
def test_nft_perf_01_single_image_latency_p95(
warm_engine, http_client, image_small
):
@@ -28,7 +27,7 @@ def test_nft_perf_01_single_image_latency_p95(
r = http_client.post(
"/detect",
files={"file": ("img.jpg", image_small, "image/jpeg")},
timeout=120,
timeout=8,
)
elapsed_ms = (time.perf_counter() - t0) * 1000.0
assert r.status_code == 200
@@ -45,8 +44,7 @@ def test_nft_perf_01_single_image_latency_p95(
assert p95 < 5000.0
@pytest.mark.slow
@pytest.mark.timeout(300)
@pytest.mark.timeout(60)
def test_nft_perf_03_tiling_overhead_large_image(
warm_engine, http_client, image_small, image_large
):
@@ -54,7 +52,7 @@ def test_nft_perf_03_tiling_overhead_large_image(
r_small = http_client.post(
"/detect",
files={"file": ("small.jpg", image_small, "image/jpeg")},
timeout=120,
timeout=8,
)
small_ms = (time.perf_counter() - t_small) * 1000.0
assert r_small.status_code == 200
@@ -66,11 +64,11 @@ def test_nft_perf_03_tiling_overhead_large_image(
"/detect",
files={"file": ("large.jpg", image_large, "image/jpeg")},
data={"config": config},
timeout=120,
timeout=20,
)
large_ms = (time.perf_counter() - t_large) * 1000.0
assert r_large.status_code == 200
assert large_ms < 120_000.0
assert large_ms < 30_000.0
print(
f"nft_perf_03_csv,baseline_small_ms,{small_ms:.2f},large_ms,{large_ms:.2f}"
)