[v1][KVCacheManager] Change prefix caching metric from counting blocks to counting tokens (#18003)
Signed-off-by: Chen Zhang <zhangch99@outlook.com>
This commit is contained in:
@@ -183,13 +183,13 @@ class PrometheusStatLogger(StatLoggerBase):
|
||||
self.counter_gpu_prefix_cache_queries = prometheus_client.Counter(
|
||||
name="vllm:gpu_prefix_cache_queries",
|
||||
documentation=
|
||||
"GPU prefix cache queries, in terms of number of queried blocks.",
|
||||
"GPU prefix cache queries, in terms of number of queried tokens.",
|
||||
labelnames=labelnames).labels(*labelvalues)
|
||||
|
||||
self.counter_gpu_prefix_cache_hits = prometheus_client.Counter(
|
||||
name="vllm:gpu_prefix_cache_hits",
|
||||
documentation=
|
||||
"GPU prefix cache hits, in terms of number of cached blocks.",
|
||||
"GPU prefix cache hits, in terms of number of cached tokens.",
|
||||
labelnames=labelnames).labels(*labelvalues)
|
||||
|
||||
#
|
||||
|
||||
@@ -19,7 +19,7 @@ class PrefixCacheStats:
|
||||
# The number of requests in this update.
|
||||
requests: int = 0
|
||||
# The number of queries in these requests. Note that "queries" here
|
||||
# means the number of blocks that were queried from the cache.
|
||||
# means the number of tokens that were queried from the cache.
|
||||
queries: int = 0
|
||||
# The number of hits in these requests.
|
||||
hits: int = 0
|
||||
|
||||
Reference in New Issue
Block a user