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
2f2d6501
Commit
2f2d6501
authored
May 17, 2016
by
Wojciech Tyczynski
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #25667 from wojtek-t/higher_list_nodes_limit
Bump threshold for listing nodes
parents
dd080de4
abe8259a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
14 deletions
+5
-14
metrics_util.go
test/e2e/framework/metrics_util.go
+5
-14
No files found.
test/e2e/framework/metrics_util.go
View file @
2f2d6501
...
@@ -41,10 +41,7 @@ const (
...
@@ -41,10 +41,7 @@ const (
// NodeStartupThreshold is a rough estimate of the time allocated for a pod to start on a node.
// NodeStartupThreshold is a rough estimate of the time allocated for a pod to start on a node.
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 {
...
@@ -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) {
...
@@ -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
==
"
pod
s"
{
if
metric
.
Verb
==
"LIST"
&&
metric
.
Resource
==
"
node
s"
{
threshold
=
list
Pod
sLatencyThreshold
(
numNodes
)
threshold
=
list
Node
sLatencyThreshold
(
numNodes
)
}
}
isBad
:=
false
isBad
:=
false
...
...
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