Skip to content

Commit 96f09ac

Browse files
committed
add bucket for metrics request_latency_buckets
Signed-off-by: Kay Yan <[email protected]>
1 parent 30d6a01 commit 96f09ac

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

vllm/engine/metrics.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,8 @@ def __init__(self, labelnames: List[str], vllm_config: VllmConfig):
151151
labelnames=labelnames,
152152
buckets=[
153153
0.001, 0.005, 0.01, 0.02, 0.04, 0.06, 0.08, 0.1, 0.25, 0.5,
154-
0.75, 1.0, 2.5, 5.0, 7.5, 10.0
154+
0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 20.0, 40.0, 80.0, 160.0, 640.0,
155+
2560.0
155156
])
156157
self.histogram_time_per_output_token = self._histogram_cls(
157158
name="vllm:time_per_output_token_seconds",
@@ -166,7 +167,7 @@ def __init__(self, labelnames: List[str], vllm_config: VllmConfig):
166167
# Latency
167168
request_latency_buckets = [
168169
0.3, 0.5, 0.8, 1.0, 1.5, 2.0, 2.5, 5.0, 10.0, 15.0, 20.0, 30.0,
169-
40.0, 50.0, 60.0
170+
40.0, 50.0, 60.0, 120.0, 240.0, 480.0, 960.0, 1920.0, 7680.0
170171
]
171172
self.histogram_e2e_time_request = self._histogram_cls(
172173
name="vllm:e2e_request_latency_seconds",

vllm/v1/metrics/loggers.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,8 @@ def __init__(self, vllm_config: VllmConfig, engine_index: int = 0):
230230
documentation="Histogram of time to first token in seconds.",
231231
buckets=[
232232
0.001, 0.005, 0.01, 0.02, 0.04, 0.06, 0.08, 0.1, 0.25, 0.5,
233-
0.75, 1.0, 2.5, 5.0, 7.5, 10.0
233+
0.75, 1.0, 2.5, 5.0, 7.5, 10.0, 20.0, 40.0, 80.0, 160.0,
234+
640.0, 2560.0
234235
],
235236
labelnames=labelnames).labels(*labelvalues)
236237

@@ -246,7 +247,7 @@ def __init__(self, vllm_config: VllmConfig, engine_index: int = 0):
246247

247248
request_latency_buckets = [
248249
0.3, 0.5, 0.8, 1.0, 1.5, 2.0, 2.5, 5.0, 10.0, 15.0, 20.0, 30.0,
249-
40.0, 50.0, 60.0
250+
40.0, 50.0, 60.0, 120.0, 240.0, 480.0, 960.0, 1920.0, 7680.0
250251
]
251252
self.histogram_e2e_time_request = \
252253
prometheus_client.Histogram(

0 commit comments

Comments
 (0)