Skip to content

Commit 212d52c

Browse files
authored
Remove latency checks for realtime load test & increase workload timeouts (#2228)
1 parent f1b05ef commit 212d52c

File tree

2 files changed

+3
-32
lines changed

2 files changed

+3
-32
lines changed

test/e2e/e2e/tests.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -522,10 +522,6 @@ def test_load_realtime(
522522
total_requests = load_config["total_requests"]
523523
desired_replicas = load_config["desired_replicas"]
524524
concurrency = load_config["concurrency"]
525-
min_rtt = load_config["min_rtt"]
526-
max_rtt = load_config["max_rtt"]
527-
avg_rtt = load_config["avg_rtt"]
528-
avg_rtt_tolerance = load_config["avg_rtt_tolerance"]
529525
status_code_timeout = load_config["status_code_timeout"]
530526

531527
api_dir = TEST_APIS_DIR / api
@@ -541,7 +537,6 @@ def test_load_realtime(
541537

542538
# controls the flow of requests
543539
request_stopper = td.Event()
544-
latencies: List[float] = []
545540
failed = False
546541
try:
547542
printer(f"getting {desired_replicas} replicas ready")
@@ -573,27 +568,11 @@ def test_load_realtime(
573568
api_name,
574569
concurrency,
575570
request_stopper,
576-
latencies=latencies,
577571
max_total_requests=total_requests,
578572
payload=payload,
579573
)
580574

581575
while not request_stopper.is_set():
582-
current_min_rtt = min(latencies) if len(latencies) > 0 else min_rtt
583-
assert (
584-
current_min_rtt >= min_rtt
585-
), f"min latency threshold hit; got {current_min_rtt}s, but the lowest accepted latency is {min_rtt}s"
586-
587-
current_max_rtt = max(latencies) if len(latencies) > 0 else max_rtt
588-
assert (
589-
current_max_rtt <= max_rtt
590-
), f"max latency threshold hit; got {current_max_rtt}s, but the highest accepted latency is {max_rtt}s"
591-
592-
current_avg_rtt = sum(latencies) / len(latencies) if len(latencies) > 0 else avg_rtt
593-
assert (
594-
avg_rtt - avg_rtt_tolerance < current_avg_rtt < avg_rtt + avg_rtt_tolerance
595-
), f"avg latency ({current_avg_rtt}s) falls outside the expected range ({avg_rtt - avg_rtt_tolerance}s - {avg_rtt + avg_rtt_tolerance})"
596-
597576
api_info = client.get_api(api_name)
598577
network_stats = api_info["metrics"]["network_stats"]
599578

@@ -604,10 +583,6 @@ def test_load_realtime(
604583
network_stats["code_5xx"] - offset_5xx == 0
605584
), f"detected 5xx response codes ({network_stats['code_5xx'] - offset_5xx}) in cortex get"
606585

607-
printer(
608-
f"min RTT: {current_min_rtt} | max RTT: {current_max_rtt} | avg RTT: {current_avg_rtt} | requests: {network_stats['code_2xx']-offset_2xx} (out of {total_requests})"
609-
)
610-
611586
# check if the requesting threads are still healthy
612587
# if not, they'll raise an exception
613588
check_futures_healthy(threads_futures)

test/e2e/tests/conftest.py

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,11 @@ def pytest_configure(config):
8484
"global": {
8585
"local_operator": config.getoption("--local-operator"),
8686
"realtime_deploy_timeout": int(
87-
os.environ.get("CORTEX_TEST_REALTIME_DEPLOY_TIMEOUT", 200)
87+
os.environ.get("CORTEX_TEST_REALTIME_DEPLOY_TIMEOUT", 320)
8888
),
8989
"batch_deploy_timeout": int(os.environ.get("CORTEX_TEST_BATCH_DEPLOY_TIMEOUT", 150)),
9090
"batch_job_timeout": int(os.environ.get("CORTEX_TEST_BATCH_JOB_TIMEOUT", 200)),
91-
"async_deploy_timeout": int(os.environ.get("CORTEX_TEST_ASYNC_DEPLOY_TIMEOUT", 150)),
91+
"async_deploy_timeout": int(os.environ.get("CORTEX_TEST_ASYNC_DEPLOY_TIMEOUT", 320)),
9292
"async_workload_timeout": int(
9393
os.environ.get("CORTEX_TEST_ASYNC_WORKLOAD_TIMEOUT", 200)
9494
),
@@ -107,10 +107,6 @@ def pytest_configure(config):
107107
"total_requests": 10 ** 5,
108108
"desired_replicas": 50,
109109
"concurrency": 50,
110-
"min_rtt": 0.004, # measured in seconds
111-
"max_rtt": 1.200, # measured in seconds
112-
"avg_rtt": 0.07, # measured in seconds
113-
"avg_rtt_tolerance": 0.06, # measured in seconds
114110
"status_code_timeout": 60, # measured in seconds
115111
},
116112
"async": {
@@ -125,7 +121,7 @@ def pytest_configure(config):
125121
"workers_per_job": 10,
126122
"items_per_job": 10 ** 5,
127123
"batch_size": 10 * 2,
128-
"workload_timeout": 200, # measured in seconds
124+
"workload_timeout": 300, # measured in seconds
129125
},
130126
"task": {
131127
"jobs": 10 ** 2,

0 commit comments

Comments
 (0)