mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-04 09:49:50 +00:00
second iteration
This commit is contained in:
parent
1dda3d8dfc
commit
f9b683532a
@ -68,7 +68,12 @@ var (
|
|||||||
Subsystem: kubeProxySubsystem,
|
Subsystem: kubeProxySubsystem,
|
||||||
Name: "network_programming_duration_seconds",
|
Name: "network_programming_duration_seconds",
|
||||||
Help: "In Cluster Network Programming Latency in seconds",
|
Help: "In Cluster Network Programming Latency in seconds",
|
||||||
Buckets: prometheus.ExponentialBuckets(0.015, 2, 20),
|
Buckets: merge(
|
||||||
|
prometheus.LinearBuckets(0.25, 0.25, 2), // 0.25s, 0.50s
|
||||||
|
prometheus.LinearBuckets(1, 1, 59), // 1s, 2s, 3s, ... 59s
|
||||||
|
prometheus.LinearBuckets(60, 5, 12), // 60s, 65s, 70s, ... 115s
|
||||||
|
prometheus.LinearBuckets(120, 30, 7), // 2min, 2.5min, 3min, ..., 5min
|
||||||
|
),
|
||||||
},
|
},
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -138,3 +143,11 @@ func SinceInMicroseconds(start time.Time) float64 {
|
|||||||
func SinceInSeconds(start time.Time) float64 {
|
func SinceInSeconds(start time.Time) float64 {
|
||||||
return time.Since(start).Seconds()
|
return time.Since(start).Seconds()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func merge(slices ...[]float64) []float64 {
|
||||||
|
result := make([]float64, 1)
|
||||||
|
for _, s := range slices {
|
||||||
|
result = append(result, s...)
|
||||||
|
}
|
||||||
|
return result
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user