vllm.v1.metrics.stats
FinishedRequestStats
dataclass
¶
Stats associated with a finished request.
Source code in vllm/v1/metrics/stats.py
IterationStats
¶
Stats associated with a single set of EngineCoreOutputs.
Source code in vllm/v1/metrics/stats.py
83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
|
__init__
¶
Source code in vllm/v1/metrics/stats.py
_time_since
¶
update_from_events
¶
update_from_events(
req_id: str,
events: list[EngineCoreEvent],
is_prefilling: bool,
req_stats: RequestStateStats,
lora_stats: Optional[LoRAStats],
)
Source code in vllm/v1/metrics/stats.py
update_from_finished_request
¶
update_from_finished_request(
finish_reason: FinishReason,
num_prompt_tokens: int,
max_tokens_param: Optional[int],
req_stats: RequestStateStats,
)
Source code in vllm/v1/metrics/stats.py
update_from_output
¶
update_from_output(
output: EngineCoreOutput,
engine_core_timestamp: float,
is_prefilling: bool,
prompt_len: int,
req_stats: RequestStateStats,
lora_stats: Optional[LoRAStats],
)
Source code in vllm/v1/metrics/stats.py
LoRARequestStates
¶
Per-LoRA request state stats.
Source code in vllm/v1/metrics/stats.py
__init__
¶
add_request
¶
add_request(req_state: RequestState)
finish_request
¶
finish_request(req_state: RequestState)
get_stats
¶
get_stats(req_state: RequestState) -> Optional[LoRAStats]
Source code in vllm/v1/metrics/stats.py
preempted_request
staticmethod
¶
scheduled_request
staticmethod
¶
update_iteration_stats
¶
update_iteration_stats(
iteration_stats: Optional[IterationStats],
)
Source code in vllm/v1/metrics/stats.py
LoRAStats
dataclass
¶
PrefixCacheStats
dataclass
¶
Stores prefix cache hit statistics.
Source code in vllm/v1/metrics/stats.py
RequestStateStats
dataclass
¶
Stats that need to be tracked across delta updates.
Source code in vllm/v1/metrics/stats.py
SchedulerStats
dataclass
¶
Stats associated with the scheduler.
Source code in vllm/v1/metrics/stats.py
prefix_cache_stats
class-attribute
instance-attribute
¶
prefix_cache_stats: PrefixCacheStats = field(
default_factory=PrefixCacheStats
)
spec_decoding_stats
class-attribute
instance-attribute
¶
spec_decoding_stats: Optional[SpecDecodingStats] = None
__init__
¶
__init__(
num_running_reqs: int = 0,
num_waiting_reqs: int = 0,
kv_cache_usage: float = 0.0,
prefix_cache_stats: PrefixCacheStats = PrefixCacheStats(),
spec_decoding_stats: Optional[SpecDecodingStats] = None,
num_corrupted_reqs: int = 0,
) -> None