mirror of
https://github.com/azaion/loader.git
synced 2026-04-22 09:36:32 +00:00
Add E2E tests, fix bugs
Made-with: Cursor
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import time
|
||||
|
||||
|
||||
def test_health_latency_p95(base_url, api_client):
|
||||
# Arrange
|
||||
times = []
|
||||
# Act
|
||||
for _ in range(100):
|
||||
start = time.perf_counter()
|
||||
response = api_client.get(f"{base_url}/health")
|
||||
elapsed = time.perf_counter() - start
|
||||
times.append(elapsed)
|
||||
response.raise_for_status()
|
||||
times.sort()
|
||||
p95 = times[94]
|
||||
# Assert
|
||||
assert p95 <= 0.1
|
||||
Reference in New Issue
Block a user