forked from phoenix/litellm-mirror
(ci/cd) load test should allow only 5% fails
This commit is contained in:
parent
6ee6fb6c73
commit
a5b8fb0ee7
1 changed files with 10 additions and 1 deletions
11
.github/workflows/interpret_load_test.py
vendored
11
.github/workflows/interpret_load_test.py
vendored
|
@ -24,8 +24,17 @@ def interpret_results(csv_file):
|
||||||
row["Average Response Time"].strip().rstrip("s")
|
row["Average Response Time"].strip().rstrip("s")
|
||||||
)
|
)
|
||||||
|
|
||||||
|
request_count = int(row["Request Count"])
|
||||||
|
failure_count = int(row["Failure Count"])
|
||||||
|
|
||||||
|
failure_percent = round((failure_count / request_count) * 100, 2)
|
||||||
|
|
||||||
# Determine status based on conditions
|
# Determine status based on conditions
|
||||||
if median_response_time < 300 and average_response_time < 300:
|
if (
|
||||||
|
median_response_time < 300
|
||||||
|
and average_response_time < 300
|
||||||
|
and failure_percent < 5
|
||||||
|
):
|
||||||
row["Status"] = "Passed ✅"
|
row["Status"] = "Passed ✅"
|
||||||
else:
|
else:
|
||||||
row["Status"] = "Failed ❌"
|
row["Status"] = "Failed ❌"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue