mirror of https://github.com/k3s-io/k3s
Bump threshold for listing nodes
parent
059980e3d9
commit
abe8259a30
|
@ -42,9 +42,6 @@ const (
|
||||||
NodeStartupThreshold = 4 * time.Second
|
NodeStartupThreshold = 4 * time.Second
|
||||||
|
|
||||||
podStartupThreshold time.Duration = 5 * time.Second
|
podStartupThreshold time.Duration = 5 * time.Second
|
||||||
listPodLatencySmallThreshold time.Duration = 1 * time.Second
|
|
||||||
listPodLatencyMediumThreshold time.Duration = 1 * time.Second
|
|
||||||
listPodLatencyLargeThreshold time.Duration = 1 * time.Second
|
|
||||||
// TODO: Decrease the small threshold to 250ms once tests are fixed.
|
// TODO: Decrease the small threshold to 250ms once tests are fixed.
|
||||||
apiCallLatencySmallThreshold time.Duration = 500 * time.Millisecond
|
apiCallLatencySmallThreshold time.Duration = 500 * time.Millisecond
|
||||||
apiCallLatencyMediumThreshold time.Duration = 500 * time.Millisecond
|
apiCallLatencyMediumThreshold time.Duration = 500 * time.Millisecond
|
||||||
|
@ -241,14 +238,8 @@ func apiCallLatencyThreshold(numNodes int) time.Duration {
|
||||||
return apiCallLatencyLargeThreshold
|
return apiCallLatencyLargeThreshold
|
||||||
}
|
}
|
||||||
|
|
||||||
func listPodsLatencyThreshold(numNodes int) time.Duration {
|
func listNodesLatencyThreshold(numNodes int) time.Duration {
|
||||||
if numNodes <= 250 {
|
return apiCallLatencyLargeThreshold
|
||||||
return listPodLatencySmallThreshold
|
|
||||||
}
|
|
||||||
if numNodes <= 500 {
|
|
||||||
return listPodLatencyMediumThreshold
|
|
||||||
}
|
|
||||||
return listPodLatencyLargeThreshold
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Prints top five summary metrics for request types with latency and returns
|
// Prints top five summary metrics for request types with latency and returns
|
||||||
|
@ -268,8 +259,8 @@ func HighLatencyRequests(c *client.Client) (int, error) {
|
||||||
top := 5
|
top := 5
|
||||||
for _, metric := range metrics.APICalls {
|
for _, metric := range metrics.APICalls {
|
||||||
threshold := apiCallLatencyThreshold(numNodes)
|
threshold := apiCallLatencyThreshold(numNodes)
|
||||||
if metric.Verb == "LIST" && metric.Resource == "pods" {
|
if metric.Verb == "LIST" && metric.Resource == "nodes" {
|
||||||
threshold = listPodsLatencyThreshold(numNodes)
|
threshold = listNodesLatencyThreshold(numNodes)
|
||||||
}
|
}
|
||||||
|
|
||||||
isBad := false
|
isBad := false
|
||||||
|
|
Loading…
Reference in New Issue