mirror of
https://github.com/azaion/detections.git
synced 2026-06-21 21:21:08 +00:00
Fixed stabilize e2e and Jetson manual runs
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
import json
|
||||
import os
|
||||
|
||||
import pytest
|
||||
|
||||
@@ -20,9 +21,10 @@ def _percentile_ms(sorted_ms, p):
|
||||
def test_nft_perf_01_single_image_latency_p95(
|
||||
warm_engine, image_detect, image_small
|
||||
):
|
||||
threshold_ms = float(os.environ.get("E2E_SINGLE_IMAGE_P95_MS", "15000"))
|
||||
times_ms = []
|
||||
for _ in range(10):
|
||||
_, elapsed_ms = image_detect(image_small, "img.jpg", timeout=8)
|
||||
_, elapsed_ms = image_detect(image_small, "img.jpg", timeout=20)
|
||||
times_ms.append(elapsed_ms)
|
||||
|
||||
sorted_ms = sorted(times_ms)
|
||||
@@ -34,14 +36,14 @@ def test_nft_perf_01_single_image_latency_p95(
|
||||
+ ",".join(f"{x:.2f}" for x in sorted_ms)
|
||||
+ f",p50,{p50:.2f},p95,{p95:.2f},p99,{p99:.2f}"
|
||||
)
|
||||
assert p95 < 5000.0
|
||||
assert p95 < threshold_ms
|
||||
|
||||
|
||||
@pytest.mark.timeout(60)
|
||||
def test_nft_perf_03_tiling_overhead_large_image(
|
||||
warm_engine, image_detect, image_small, image_large
|
||||
):
|
||||
_, small_ms = image_detect(image_small, "small.jpg", timeout=8)
|
||||
_, small_ms = image_detect(image_small, "small.jpg", timeout=20)
|
||||
_, large_ms = image_detect(
|
||||
image_large, "large.jpg",
|
||||
config=json.dumps({"altitude": 400, "focal_length": 24, "sensor_width": 23.5}),
|
||||
|
||||
Reference in New Issue
Block a user