mirror of
https://github.com/azaion/detections.git
synced 2026-06-22 20:51:08 +00:00
Fixed prevent smoke builds and keep SSE streams alive
This commit is contained in:
@@ -4,8 +4,9 @@
|
|||||||
# here so builds are gated on a green test run.
|
# here so builds are gated on a green test run.
|
||||||
|
|
||||||
when:
|
when:
|
||||||
event: [push, manual]
|
- event: [push, manual]
|
||||||
branch: [dev, stage, main]
|
branch: [dev, stage, main]
|
||||||
|
evaluate: 'E2E_CONVERT_JETSON != "1" && E2E_SMOKE_TEST != "1"'
|
||||||
|
|
||||||
# Multi-arch matrix. detections is the only repo today with split per-arch
|
# Multi-arch matrix. detections is the only repo today with split per-arch
|
||||||
# Dockerfiles (Jetson uses Dockerfile.jetson with TensorRT/CUDA on L4T;
|
# Dockerfiles (Jetson uses Dockerfile.jetson with TensorRT/CUDA on L4T;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ def _percentile_ms(sorted_ms, p):
|
|||||||
return sorted_ms[lo] * (1 - w) + sorted_ms[hi] * w
|
return sorted_ms[lo] * (1 - w) + sorted_ms[hi] * w
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.timeout(60)
|
@pytest.mark.timeout(240)
|
||||||
def test_nft_perf_01_single_image_latency_p95(
|
def test_nft_perf_01_single_image_latency_p95(
|
||||||
warm_engine, image_detect, image_small
|
warm_engine, image_detect, image_small
|
||||||
):
|
):
|
||||||
@@ -39,7 +39,7 @@ def test_nft_perf_01_single_image_latency_p95(
|
|||||||
assert p95 < threshold_ms
|
assert p95 < threshold_ms
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.timeout(60)
|
@pytest.mark.timeout(120)
|
||||||
def test_nft_perf_03_tiling_overhead_large_image(
|
def test_nft_perf_03_tiling_overhead_large_image(
|
||||||
warm_engine, image_detect, image_small, image_large
|
warm_engine, image_detect, image_small, image_large
|
||||||
):
|
):
|
||||||
|
|||||||
+5
-2
@@ -415,8 +415,11 @@ async def detect_events(channel_id: str, request: Request, after_ts: Optional[in
|
|||||||
if ts_ms > after_ts:
|
if ts_ms > after_ts:
|
||||||
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
||||||
while True:
|
while True:
|
||||||
ts_ms, data = await queue.get()
|
try:
|
||||||
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
ts_ms, data = await asyncio.wait_for(queue.get(), timeout=1.0)
|
||||||
|
yield f"id: {ts_ms}\ndata: {data}\n\n"
|
||||||
|
except asyncio.TimeoutError:
|
||||||
|
yield ": heartbeat\n\n"
|
||||||
except asyncio.CancelledError:
|
except asyncio.CancelledError:
|
||||||
pass
|
pass
|
||||||
finally:
|
finally:
|
||||||
|
|||||||
Reference in New Issue
Block a user