...
1
16
17 package metrics
18
19 import (
20 "k8s.io/component-base/metrics"
21 )
22
23 const ReplicaSetControllerSubsystem = "replicaset_controller"
24
25 var SortingDeletionAgeRatio = metrics.NewHistogram(
26 &metrics.HistogramOpts{
27 Subsystem: ReplicaSetControllerSubsystem,
28 Name: "sorting_deletion_age_ratio",
29 Help: "The ratio of chosen deleted pod's ages to the current youngest pod's age (at the time). Should be <2. " +
30 "The intent of this metric is to measure the rough efficacy of the LogarithmicScaleDown feature gate's effect on " +
31 "the sorting (and deletion) of pods when a replicaset scales down. This only considers Ready pods when calculating and reporting.",
32 Buckets: metrics.ExponentialBuckets(0.25, 2, 6),
33 StabilityLevel: metrics.ALPHA,
34 },
35 )
36
37
38 func Register(registrationFunc func(metrics.Registerable) error) error {
39 return registrationFunc(SortingDeletionAgeRatio)
40 }
41
View as plain text