[Feature][Benchmarks] Support inf burstiness (#26941)

Signed-off-by: Sophie du Couédic <sop@zurich.ibm.com>
This commit is contained in:
Sophie du Couédic 2025-11-03 19:33:17 +01:00 committed by GitHub
parent 2c19d96777
commit a4398fbb5e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -189,9 +189,16 @@ async def get_request(
total_requests,
request_rate,
)
assert current_request_rate > 0.0, (
f"Obtained non-positive request rate {current_request_rate}."
)
request_rates.append(current_request_rate)
if current_request_rate == float("inf"):
delay_ts.append(0)
elif burstiness == float("inf"):
# when burstiness tends to infinity, the delay time becomes constant
# and tends to the inverse of the request rate
delay_ts.append(1.0 / current_request_rate)
else:
theta = 1.0 / (current_request_rate * burstiness)