Unverified Commit a4398fbb authored by Sophie du Couédic's avatar Sophie du Couédic Committed by GitHub
Browse files

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


Signed-off-by: default avatarSophie du Couédic <sop@zurich.ibm.com>
parent 2c19d967
...@@ -189,9 +189,16 @@ async def get_request( ...@@ -189,9 +189,16 @@ async def get_request(
total_requests, total_requests,
request_rate, request_rate,
) )
assert current_request_rate > 0.0, (
f"Obtained non-positive request rate {current_request_rate}."
)
request_rates.append(current_request_rate) request_rates.append(current_request_rate)
if current_request_rate == float("inf"): if current_request_rate == float("inf"):
delay_ts.append(0) 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: else:
theta = 1.0 / (current_request_rate * burstiness) theta = 1.0 / (current_request_rate * burstiness)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment