mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 11:21:47 +00:00
fix apiserver metrics RecordsWatchCacheCapacityChange
use watchCache as increase total
if old less than new, Inc function should be called for `watchCacheCapacityIncreaseTotal` instead of `watchCacheCapacity` Signed-off-by: joey <zchengjoey@gmail.com>
This commit is contained in:
parent
5961d8ce1b
commit
96b9531f3e
@ -167,7 +167,7 @@ func RecordListCacheMetrics(resourcePrefix, indexName string, numFetched, numRet
|
|||||||
func RecordsWatchCacheCapacityChange(objType string, old, new int) {
|
func RecordsWatchCacheCapacityChange(objType string, old, new int) {
|
||||||
WatchCacheCapacity.WithLabelValues(objType).Set(float64(new))
|
WatchCacheCapacity.WithLabelValues(objType).Set(float64(new))
|
||||||
if old < new {
|
if old < new {
|
||||||
WatchCacheCapacity.WithLabelValues(objType).Inc()
|
watchCacheCapacityIncreaseTotal.WithLabelValues(objType).Inc()
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
watchCacheCapacityDecreaseTotal.WithLabelValues(objType).Inc()
|
watchCacheCapacityDecreaseTotal.WithLabelValues(objType).Inc()
|
||||||
|
Loading…
Reference in New Issue
Block a user