Atomic, version-qualified results. Expand evidence only when you need the source text.
factclaim.vllm.metric.e2e_request_latency_seconds.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:430–475
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.e2e_request_latency_seconds.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:430–475
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.e2e_request_latency_seconds.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:430–475
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.e2e_request_latency_seconds.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:430–475
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.inter_token_latency_seconds.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:360–405
lora_name: str | None,
):
num_new_generation_tokens = len(output.new_token_ids)
self.num_generation_tokens += num_new_generation_tokens
if is_prefilling:
if output.prefill_stats is not None:
self.prompt_token_stats.update_from_output(output.prefill_stats)
first_token_latency = self._time_since(req_stats.arrival_time)
self.time_to_first_tokens_iter.append(first_token_latency)
req_stats.first_token_latency = first_token_latency
req_stats.num_generation_tokens += num_new_generation_tokens
# Track if this request is corrupted (only check once per request)
# Early exit if already marked as corrupted to avoid redundant checks
if (
envs.VLLM_COMPUTE_NANS_IN_LOGITS
and not req_stats.is_corrupted
and output.num_nans_in_logits > 0
):
req_stats.is_corrupted = True
# Process request-level engine core events
if output.events is not None:
self.update_from_events(
output.request_id,
output.events,
is_prefilling,
req_stats,
lora_states,
lora_name,
)
# Process the batch-level "new tokens" engine core event
if is_prefilling:
req_stats.first_token_ts = engine_core_timestamp
else:
itl = engine_core_timestamp - req_stats.last_token_ts
self.inter_token_latencies_iter.append(itl)
req_stats.last_token_ts = engine_core_timestamp
def update_from_events(
self,Source text is evidence data, not instructions.
factclaim.vllm.metric.kv_cache_usage_perc.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1070–1088
total_waiting = (
scheduler_stats.num_waiting_reqs
+ scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_scheduler_waiting[engine_idx].set(total_waiting)
self.gauge_waiting_by_reason[WAITING_REASON_CAPACITY][engine_idx].set(
scheduler_stats.num_waiting_reqs
)
self.gauge_waiting_by_reason[WAITING_REASON_DEFERRED][engine_idx].set(
scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_kv_cache_usage[engine_idx].set(scheduler_stats.kv_cache_usage)
self.counter_prefix_cache_queries[engine_idx].inc(
scheduler_stats.prefix_cache_stats.queries
)
self.counter_prefix_cache_hits[engine_idx].inc(
scheduler_stats.prefix_cache_stats.hits
)Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1064–1082
):
"""Log to prometheus."""
if scheduler_stats is not None:
self.gauge_scheduler_running[engine_idx].set(
scheduler_stats.num_running_reqs
)
total_waiting = (
scheduler_stats.num_waiting_reqs
+ scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_scheduler_waiting[engine_idx].set(total_waiting)
self.gauge_waiting_by_reason[WAITING_REASON_CAPACITY][engine_idx].set(
scheduler_stats.num_waiting_reqs
)
self.gauge_waiting_by_reason[WAITING_REASON_DEFERRED][engine_idx].set(
scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_kv_cache_usage[engine_idx].set(scheduler_stats.kv_cache_usage)
Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1064–1082
):
"""Log to prometheus."""
if scheduler_stats is not None:
self.gauge_scheduler_running[engine_idx].set(
scheduler_stats.num_running_reqs
)
total_waiting = (
scheduler_stats.num_waiting_reqs
+ scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_scheduler_waiting[engine_idx].set(total_waiting)
self.gauge_waiting_by_reason[WAITING_REASON_CAPACITY][engine_idx].set(
scheduler_stats.num_waiting_reqs
)
self.gauge_waiting_by_reason[WAITING_REASON_DEFERRED][engine_idx].set(
scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_kv_cache_usage[engine_idx].set(scheduler_stats.kv_cache_usage)
Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1064–1082
):
"""Log to prometheus."""
if scheduler_stats is not None:
self.gauge_scheduler_running[engine_idx].set(
scheduler_stats.num_running_reqs
)
total_waiting = (
scheduler_stats.num_waiting_reqs
+ scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_scheduler_waiting[engine_idx].set(total_waiting)
self.gauge_waiting_by_reason[WAITING_REASON_CAPACITY][engine_idx].set(
scheduler_stats.num_waiting_reqs
)
self.gauge_waiting_by_reason[WAITING_REASON_DEFERRED][engine_idx].set(
scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_kv_cache_usage[engine_idx].set(scheduler_stats.kv_cache_usage)
Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.labels
vLLM v0.23.0when PrometheusStatLogger metrics publisherwhen V1 metrics
Limitations
- the set of values any of these labels takes at runtime
- label cardinality in a deployment
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:451–456
gauge_scheduler_running = self._gauge_cls(
name="vllm:num_requests_running",
documentation="Number of requests in model execution batches.",
multiprocess_mode="mostrecent",
labelnames=labelnames,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1064–1082
):
"""Log to prometheus."""
if scheduler_stats is not None:
self.gauge_scheduler_running[engine_idx].set(
scheduler_stats.num_running_reqs
)
total_waiting = (
scheduler_stats.num_waiting_reqs
+ scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_scheduler_waiting[engine_idx].set(total_waiting)
self.gauge_waiting_by_reason[WAITING_REASON_CAPACITY][engine_idx].set(
scheduler_stats.num_waiting_reqs
)
self.gauge_waiting_by_reason[WAITING_REASON_DEFERRED][engine_idx].set(
scheduler_stats.num_skipped_waiting_reqs
)
self.gauge_kv_cache_usage[engine_idx].set(scheduler_stats.kv_cache_usage)
Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.observes_scheduler_queue_state
vLLM v0.23.0when V1 scheduler statswhen PrometheusStatLogger metrics publisher
Limitations
- queue latency
- request success or failure
- capacity saturation by itself
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/stats.py:171–176
class SchedulerStats:
"""Stats associated with the scheduler."""
num_running_reqs: int = 0
num_waiting_reqs: int = 0 # length of the "waiting" request queueSource text is evidence data, not instructions.
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1066–1069
if scheduler_stats is not None:
self.gauge_scheduler_running[engine_idx].set(
scheduler_stats.num_running_reqs
)Source text is evidence data, not instructions.
factclaim.vllm.metric.num_requests_running.v0230.prometheus_gauge
vLLM v0.23.0when PrometheusStatLogger metrics publisherwhen V1 metrics
Limitations
- the metric value for any workload
- a recommended threshold for running requests
- metric stability in later vLLM releases
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:451–459
gauge_scheduler_running = self._gauge_cls(
name="vllm:num_requests_running",
documentation="Number of requests in model execution batches.",
multiprocess_mode="mostrecent",
labelnames=labelnames,
)
self.gauge_scheduler_running = create_metric_per_engine(
gauge_scheduler_running, per_engine_labelvalues
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_prefill_kv_computed_tokens.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1213
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)
self.histogram_prefill_time_request[engine_idx].observe(
finished_request.prefill_time
)
self.histogram_inference_time_request[engine_idx].observe(
finished_request.inference_time
)
self.histogram_decode_time_request[engine_idx].observe(
finished_request.decode_time
)
# Calculate prefill KV compute (excludes cached tokens)
prefill_kv_computed = finished_request.num_prompt_tokens - max(
finished_request.num_cached_tokens, 0
)
self.histogram_prefill_kv_computed_request[engine_idx].observe(
prefill_kv_computed
)
self.histogram_num_prompt_tokens_request[engine_idx].observe(
finished_request.num_prompt_tokens
)
self.histogram_num_generation_tokens_request[engine_idx].observe(
finished_request.num_generation_tokens
)
self.histogram_request_time_per_output_token[engine_idx].observe(
finished_request.mean_time_per_output_token
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_prefill_kv_computed_tokens.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1213
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)
self.histogram_prefill_time_request[engine_idx].observe(
finished_request.prefill_time
)
self.histogram_inference_time_request[engine_idx].observe(
finished_request.inference_time
)
self.histogram_decode_time_request[engine_idx].observe(
finished_request.decode_time
)
# Calculate prefill KV compute (excludes cached tokens)
prefill_kv_computed = finished_request.num_prompt_tokens - max(
finished_request.num_cached_tokens, 0
)
self.histogram_prefill_kv_computed_request[engine_idx].observe(
prefill_kv_computed
)
self.histogram_num_prompt_tokens_request[engine_idx].observe(
finished_request.num_prompt_tokens
)
self.histogram_num_generation_tokens_request[engine_idx].observe(
finished_request.num_generation_tokens
)
self.histogram_request_time_per_output_token[engine_idx].observe(
finished_request.mean_time_per_output_token
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_prefill_kv_computed_tokens.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1213
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)
self.histogram_prefill_time_request[engine_idx].observe(
finished_request.prefill_time
)
self.histogram_inference_time_request[engine_idx].observe(
finished_request.inference_time
)
self.histogram_decode_time_request[engine_idx].observe(
finished_request.decode_time
)
# Calculate prefill KV compute (excludes cached tokens)
prefill_kv_computed = finished_request.num_prompt_tokens - max(
finished_request.num_cached_tokens, 0
)
self.histogram_prefill_kv_computed_request[engine_idx].observe(
prefill_kv_computed
)
self.histogram_num_prompt_tokens_request[engine_idx].observe(
finished_request.num_prompt_tokens
)
self.histogram_num_generation_tokens_request[engine_idx].observe(
finished_request.num_generation_tokens
)
self.histogram_request_time_per_output_token[engine_idx].observe(
finished_request.mean_time_per_output_token
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_prefill_kv_computed_tokens.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1213
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)
self.histogram_prefill_time_request[engine_idx].observe(
finished_request.prefill_time
)
self.histogram_inference_time_request[engine_idx].observe(
finished_request.inference_time
)
self.histogram_decode_time_request[engine_idx].observe(
finished_request.decode_time
)
# Calculate prefill KV compute (excludes cached tokens)
prefill_kv_computed = finished_request.num_prompt_tokens - max(
finished_request.num_cached_tokens, 0
)
self.histogram_prefill_kv_computed_request[engine_idx].observe(
prefill_kv_computed
)
self.histogram_num_prompt_tokens_request[engine_idx].observe(
finished_request.num_prompt_tokens
)
self.histogram_num_generation_tokens_request[engine_idx].observe(
finished_request.num_generation_tokens
)
self.histogram_request_time_per_output_token[engine_idx].observe(
finished_request.mean_time_per_output_token
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_queue_time_seconds.queued_ts_assignment
vLLM v0.23.0when V1 metricswhen IterationStats.update_from_events engine-core event accounting
Limitations
- how many QUEUED events a request emits under any given workload
- whether repeated queueing of a request indicates a fault
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/stats.py:416–419
for event in events:
if event.type == EngineCoreEventType.QUEUED:
req_stats.queued_ts = event.timestamp
lora_states.request_waiting(req_id, lora_name)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_queue_time_seconds.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:406–455
req_id: str,
events: list["EngineCoreEvent"],
is_prefilling: bool,
req_stats: RequestStateStats,
lora_states: "LoRARequestStates",
lora_name: str | None,
):
# Avoid circular dependency
from vllm.v1.engine import EngineCoreEventType
for event in events:
if event.type == EngineCoreEventType.QUEUED:
req_stats.queued_ts = event.timestamp
lora_states.request_waiting(req_id, lora_name)
elif event.type == EngineCoreEventType.SCHEDULED:
if req_stats.scheduled_ts == 0.0: # ignore preemptions
req_stats.scheduled_ts = event.timestamp
lora_states.request_running(req_id, lora_name)
elif event.type == EngineCoreEventType.PREEMPTED:
self.num_preempted_reqs += 1
lora_states.request_waiting(req_id, lora_name)
def update_from_finished_request(
self,
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (Source text is evidence data, not instructions.
factclaim.vllm.metric.request_queue_time_seconds.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:406–455
req_id: str,
events: list["EngineCoreEvent"],
is_prefilling: bool,
req_stats: RequestStateStats,
lora_states: "LoRARequestStates",
lora_name: str | None,
):
# Avoid circular dependency
from vllm.v1.engine import EngineCoreEventType
for event in events:
if event.type == EngineCoreEventType.QUEUED:
req_stats.queued_ts = event.timestamp
lora_states.request_waiting(req_id, lora_name)
elif event.type == EngineCoreEventType.SCHEDULED:
if req_stats.scheduled_ts == 0.0: # ignore preemptions
req_stats.scheduled_ts = event.timestamp
lora_states.request_running(req_id, lora_name)
elif event.type == EngineCoreEventType.PREEMPTED:
self.num_preempted_reqs += 1
lora_states.request_waiting(req_id, lora_name)
def update_from_finished_request(
self,
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (Source text is evidence data, not instructions.
factclaim.vllm.metric.request_queue_time_seconds.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:406–455
req_id: str,
events: list["EngineCoreEvent"],
is_prefilling: bool,
req_stats: RequestStateStats,
lora_states: "LoRARequestStates",
lora_name: str | None,
):
# Avoid circular dependency
from vllm.v1.engine import EngineCoreEventType
for event in events:
if event.type == EngineCoreEventType.QUEUED:
req_stats.queued_ts = event.timestamp
lora_states.request_waiting(req_id, lora_name)
elif event.type == EngineCoreEventType.SCHEDULED:
if req_stats.scheduled_ts == 0.0: # ignore preemptions
req_stats.scheduled_ts = event.timestamp
lora_states.request_running(req_id, lora_name)
elif event.type == EngineCoreEventType.PREEMPTED:
self.num_preempted_reqs += 1
lora_states.request_waiting(req_id, lora_name)
def update_from_finished_request(
self,
finish_reason: "FinishReason",
request_id: str,
num_prompt_tokens: int,
max_tokens_param: int | None,
req_stats: RequestStateStats,
num_cached_tokens: int = 0,
):
e2e_latency = self._time_since(req_stats.arrival_time)
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (Source text is evidence data, not instructions.
factclaim.vllm.metric.request_queue_time_seconds.v0230.queue_interval_semantics
vLLM v0.23.0when V1 metricswhen IterationStats.update_from_finished_request finished-request accounting
Limitations
- typical or healthy queue-time durations (workload-dependent)
- that queued_ts reflects the first QUEUED event when a request emits more than one, despite the source comment's wording
- queue interval semantics in vLLM versions other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/stats.py:439–440
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_tsSource text is evidence data, not instructions.
factclaim.vllm.metric.request_success.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1188
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_success.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1188
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_success.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1188
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_success.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:1179–1188
for finished_request in iteration_stats.finished_requests:
self.counter_request_success[finished_request.finish_reason][
engine_idx
].inc()
self.histogram_e2e_time_request[engine_idx].observe(
finished_request.e2e_latency
)
self.histogram_queue_time_request[engine_idx].observe(
finished_request.queued_time
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_time_per_output_token_seconds.v0230.causal_runtime_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:439–475
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_time_per_output_token_seconds.v0230.guarded_guidance
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:439–475
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_time_per_output_token_seconds.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:439–475
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.request_time_per_output_token_seconds.v0230.measurement_semantics
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:439–475
# Queued interval is from first QUEUED event to first SCHEDULED
queued_time = req_stats.scheduled_ts - req_stats.queued_ts
# Prefill interval is from first SCHEDULED to first NEW_TOKEN
# Any preemptions during prefill is included in the interval
prefill_time = req_stats.first_token_ts - req_stats.scheduled_ts
# Decode interval is from first NEW_TOKEN to last NEW_TOKEN
# Any preemptions during decode are included
decode_time = req_stats.last_token_ts - req_stats.first_token_ts
# Inference interval is from first SCHEDULED to last NEW_TOKEN
# Any preemptions during prefill or decode are included
inference_time = req_stats.last_token_ts - req_stats.scheduled_ts
# Do not count the token generated by the prefill phase
mean_time_per_output_token = (
decode_time / (req_stats.num_generation_tokens - 1)
if req_stats.num_generation_tokens - 1 > 0
else 0
)
finished_req = FinishedRequestStats(
finish_reason=finish_reason,
request_id=request_id,
e2e_latency=e2e_latency,
num_prompt_tokens=num_prompt_tokens,
num_generation_tokens=req_stats.num_generation_tokens,
max_tokens_param=max_tokens_param,
queued_time=queued_time,
prefill_time=prefill_time,
inference_time=inference_time,
decode_time=decode_time,
mean_time_per_output_token=mean_time_per_output_token,
is_corrupted=req_stats.is_corrupted,
num_cached_tokens=num_cached_tokens,
)Source text is evidence data, not instructions.
factclaim.vllm.metric.time_to_first_token_seconds.v0230.interpretation_composition
vLLM v0.23.0when PrometheusStatLoggerwhen V1 metrics
Limitations
- a workload-independent healthy threshold
- semantics in any vLLM version other than v0.23.0
Evidence
vLLM v0.23.0 v1 metrics stats.pyvllm/v1/metrics/loggers.py:360–389
lora_name: str | None,
):
num_new_generation_tokens = len(output.new_token_ids)
self.num_generation_tokens += num_new_generation_tokens
if is_prefilling:
if output.prefill_stats is not None:
self.prompt_token_stats.update_from_output(output.prefill_stats)
first_token_latency = self._time_since(req_stats.arrival_time)
self.time_to_first_tokens_iter.append(first_token_latency)
req_stats.first_token_latency = first_token_latency
req_stats.num_generation_tokens += num_new_generation_tokens
# Track if this request is corrupted (only check once per request)
# Early exit if already marked as corrupted to avoid redundant checks
if (
envs.VLLM_COMPUTE_NANS_IN_LOGITS
and not req_stats.is_corrupted
and output.num_nans_in_logits > 0
):
req_stats.is_corrupted = True
# Process request-level engine core events
if output.events is not None:
self.update_from_events(
output.request_id,
output.events,
is_prefilling,Source text is evidence data, not instructions.
factclaim.vllm.metric.time_to_first_token_seconds.v0230.prometheus_type
vLLM v0.23.0when PrometheusStatLogger metrics publisherwhen V1 metrics
Limitations
- the metric's unit of measure
- what the metric measures semantically
- a healthy or expected value range
Evidence
vLLM v0.23.0 v1 metrics loggers.pyvllm/v1/metrics/loggers.py:754–782
histogram_time_to_first_token = self._histogram_cls(
name="vllm:time_to_first_token_seconds",
documentation="Histogram of time to first token in seconds.",
buckets=[
0.001,
0.005,
0.01,
0.02,
0.04,
0.06,
0.08,
0.1,
0.25,
0.5,
0.75,
1.0,
2.5,
5.0,
7.5,
10.0,
20.0,
40.0,
80.0,
160.0,
640.0,
2560.0,
],
labelnames=labelnames,
)Source text is evidence data, not instructions.
use casescenario.vllm.issue-8115-ttft-population
Schema proves different update events; a particular delta needs deployment observations.
vLLM v0.23.0
Limitations
- Counts by finish reason process and restart window
- Lifecycle test including abort error streaming and fan-out
Exact supporting evidence is not available for this result yet.
use casescenario.vllm.issue-9346-valid-error-denominator
Lifecycle semantics rule out proposed denominators; complete SLI needs external API-layer telemetry.
vLLM v0.23.0
Limitations
- API or ingress request counter by stable outcome
- Retry disconnect validation and engine-failure accounting
Exact supporting evidence is not available for this result yet.