Skip to content

Commit a4398fb

Browse files
authored
[Feature][Benchmarks] Support inf burstiness (#26941)
Signed-off-by: Sophie du Couédic <[email protected]>
1 parent 2c19d96 commit a4398fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

vllm/benchmarks/serve.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,9 +189,16 @@ async def get_request(
189189
total_requests,
190190
request_rate,
191191
)
192+
assert current_request_rate > 0.0, (
193+
f"Obtained non-positive request rate {current_request_rate}."
194+
)
192195
request_rates.append(current_request_rate)
193196
if current_request_rate == float("inf"):
194197
delay_ts.append(0)
198+
elif burstiness == float("inf"):
199+
# when burstiness tends to infinity, the delay time becomes constant
200+
# and tends to the inverse of the request rate
201+
delay_ts.append(1.0 / current_request_rate)
195202
else:
196203
theta = 1.0 / (current_request_rate * burstiness)
197204

0 commit comments

Comments
 (0)