move MergeBuckets into component-base so we can properly support it for static-analysis

Change-Id: I137413b5b0328487a7bcd70eca79a8b0ae6dea51
This commit is contained in:
Han Kang
2022-10-18 10:52:33 -07:00
parent 507cf76570
commit 287738c125
5 changed files with 136 additions and 17 deletions

View File

@@ -488,6 +488,21 @@ var (
StabilityLevel: metrics.BETA,
},
)
NetworkProgrammingLatency2 = metrics.NewHistogram(
&metrics.HistogramOpts{
Subsystem: "kube_proxy",
Name: "network_programming_duration_seconds2",
Help: "In Cluster Network Programming Latency in seconds",
Buckets: metrics.MergeBuckets(
metrics.LinearBuckets(0.25, 0.25, 2), // 0.25s, 0.50s
[]float64{1, 5, 10, 59}, // 1s, 2s, 3s, ... 59s
metrics.LinearBuckets(60, 5, 12), // 60s, 65s, 70s, ... 115s
metrics.LinearBuckets(120, 30, 7), // 2min, 2.5min, 3min, ..., 5min
),
StabilityLevel: metrics.BETA,
},
)
)
var registerMetrics sync.Once

View File

@@ -84,6 +84,37 @@
- 240
- 270
- 300
- name: network_programming_duration_seconds2
subsystem: kube_proxy
help: In Cluster Network Programming Latency in seconds
type: Histogram
stabilityLevel: BETA
buckets:
- 0.25
- 0.5
- 1
- 5
- 10
- 59
- 60
- 65
- 70
- 75
- 80
- 85
- 90
- 95
- 100
- 105
- 110
- 115
- 120
- 150
- 180
- 210
- 240
- 270
- 300
- name: certificate_manager_client_ttl_seconds
subsystem: kubelet
help: Gauge of the TTL (time-to-live) of the Kubelet's client certificate. The value