Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
f3736458
Commit
f3736458
authored
Sep 19, 2017
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Increase api latency threshold for cluster-scoped list calls
parent
16670f1a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
7 deletions
+15
-7
metrics_util.go
test/e2e/framework/metrics_util.go
+15
-7
No files found.
test/e2e/framework/metrics_util.go
View file @
f3736458
...
...
@@ -52,9 +52,11 @@ const (
apiCallLatencyThreshold
time
.
Duration
=
1
*
time
.
Second
// We use a higher threshold for list apicalls if the cluster is big (i.e having > 500 nodes)
// as list response sizes are bigger in general for big clusters.
apiListCallLatencyThreshold
time
.
Duration
=
5
*
time
.
Second
bigClusterNodeCountThreshold
=
500
// as list response sizes are bigger in general for big clusters. We also use a higher threshold
// for list calls at cluster scope (this includes non-namespaced and all-namespaced calls).
apiListCallLatencyThreshold
time
.
Duration
=
5
*
time
.
Second
apiClusterScopeListCallThreshold
time
.
Duration
=
10
*
time
.
Second
bigClusterNodeCountThreshold
=
500
// Cluster Autoscaler metrics names
caFunctionMetric
=
"cluster_autoscaler_function_duration_seconds_bucket"
...
...
@@ -371,13 +373,19 @@ func HighLatencyRequests(c clientset.Interface, nodeCount int) (int, *APIRespons
for
i
:=
range
metrics
.
APICalls
{
latency
:=
metrics
.
APICalls
[
i
]
.
Latency
.
Perc99
isListCall
:=
(
metrics
.
APICalls
[
i
]
.
Verb
==
"LIST"
)
isClusterScopedCall
:=
(
metrics
.
APICalls
[
i
]
.
Scope
==
"cluster"
)
isBad
:=
false
if
latency
>
apiCallLatencyThreshold
{
if
!
isListCall
||
!
isBigCluster
||
(
latency
>
apiListCallLatencyThreshold
)
{
isBad
=
true
badMetrics
++
latencyThreshold
:=
apiCallLatencyThreshold
if
isListCall
&&
isBigCluster
{
latencyThreshold
=
apiListCallLatencyThreshold
if
isClusterScopedCall
{
latencyThreshold
=
apiClusterScopeListCallThreshold
}
}
if
latency
>
latencyThreshold
{
isBad
=
true
badMetrics
++
}
if
top
>
0
||
isBad
{
top
--
prefix
:=
""
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment