mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
Merge pull request #102484 from xiaoanyunfei/fix/watch_cache_metrics
fix watch_cache_capacity metrics
This commit is contained in:
commit
a79a0f546a
@ -86,10 +86,10 @@ func init() {
|
||||
|
||||
// recordsWatchCacheCapacityChange record watchCache capacity resize(increase or decrease) operations.
|
||||
func recordsWatchCacheCapacityChange(objType string, old, new int) {
|
||||
watchCacheCapacity.WithLabelValues(objType).Set(float64(new))
|
||||
if old < new {
|
||||
watchCacheCapacityIncreaseTotal.WithLabelValues(objType).Inc()
|
||||
return
|
||||
}
|
||||
watchCacheCapacityDecreaseTotal.WithLabelValues(objType).Inc()
|
||||
watchCacheCapacity.WithLabelValues(objType).Set(float64(new))
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user