vllm.distributed.kv_transfer.kv_connector.v1.metrics ¶
Classes:
-
KVConnectorLogging– -
KVConnectorProm–Support for registering per-connector Prometheus metrics, and
-
KVConnectorPromMetrics–A base class for per-connector Prometheus metric registration
-
KVConnectorStats–Base class for KV Connector Stats, a container for transfer performance
KVConnectorLogging ¶
Methods:
-
log–Log transfer metrics periodically, similar to throughput logging
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
log(log_fn=logger.info) ¶
Log transfer metrics periodically, similar to throughput logging
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
KVConnectorProm ¶
Support for registering per-connector Prometheus metrics, and recording transfer statistics to those metrics. Uses KVConnectorBase.build_prom_metrics().
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
KVConnectorPromMetrics ¶
A base class for per-connector Prometheus metric registration and recording.
Methods:
-
observe–Record the supplied transfer statistics to Prometheus metrics. These
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
observe(transfer_stats_data, engine_idx=0) ¶
Record the supplied transfer statistics to Prometheus metrics. These statistics are engine-specific, and should be recorded to a metric with the appropriate 'engine' label. These metric instances can be created using the create_metric_per_engine() helper method.
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
KVConnectorStats dataclass ¶
Base class for KV Connector Stats, a container for transfer performance metrics or otherwise important telemetry from the connector. All sub-classes need to be serializable as stats are sent from worker to logger process.
Methods:
-
aggregate–Aggregate stats with another
KVConnectorStatsobject. -
is_empty–Return True if the stats are empty.
-
reduce–Reduce the observations collected during a time interval to one or
-
reset–Reset the stats, clear the state.
Source code in vllm/distributed/kv_transfer/kv_connector/v1/metrics.py
aggregate(other) ¶
is_empty() ¶
reduce() ¶
Reduce the observations collected during a time interval to one or more representative values (eg avg/median/sum of the series). This is meant to be called by the logger to produce a summary of the stats for the last time interval.