add cache_config's info to prometheus metrics. (#3100)

This commit is contained in:
Allen.Dou
2024-02-29 06:15:18 +00:00
committed by GitHub
parent a6d471c759
commit 9289e577ec
3 changed files with 14 additions and 1 deletions
+4
View File
@@ -308,6 +308,10 @@ class CacheConfig:
self.num_gpu_blocks = None
self.num_cpu_blocks = None
def metrics_info(self):
# convert cache_config to dict(key: str, value:str) for prometheus metrics info
return {key: str(value) for key, value in self.__dict__.items()}
def _verify_args(self) -> None:
if self.gpu_memory_utilization > 1.0:
raise ValueError(