UpdateCacheMetrics is called directly by the prom handler
()
| 20 | |
| 21 | // UpdateCacheMetrics is called directly by the prom handler |
| 22 | func UpdateCacheMetrics() { |
| 23 | metrics.CacheMetrics.Reset() |
| 24 | |
| 25 | for i, name := range CacheNames { |
| 26 | metrics.CacheMetrics.With(prometheus.Labels{"name": name, "type": CacheConfig[i].Strategy}).Set(float64(Caches[i].Len(false))) |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | type CacheCfg struct { |
| 31 | Name string |
no test coverage detected
searching dependent graphs…