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
44f79830
Commit
44f79830
authored
Nov 27, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #17784 from gmarek/testing
Auto commit by PR queue bot
parents
505d12a9
b2dd7a23
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
3 deletions
+16
-3
metrics_util.go
test/e2e/metrics_util.go
+16
-3
No files found.
test/e2e/metrics_util.go
View file @
44f79830
...
...
@@ -39,8 +39,11 @@ import (
)
const
(
podStartupThreshold
time
.
Duration
=
5
*
time
.
Second
listPodLatencyThreshold
time
.
Duration
=
2
*
time
.
Second
podStartupThreshold
time
.
Duration
=
5
*
time
.
Second
// TODO: Decrease PodStartup latencies as soon as their perfomance improves
listPodLatencySmallThreshold
time
.
Duration
=
2
*
time
.
Second
listPodLatencyMediumThreshold
time
.
Duration
=
4
*
time
.
Second
listPodLatencyLargeThreshold
time
.
Duration
=
15
*
time
.
Second
apiCallLatencySmallThreshold
time
.
Duration
=
250
*
time
.
Millisecond
apiCallLatencyMediumThreshold
time
.
Duration
=
500
*
time
.
Millisecond
apiCallLatencyLargeThreshold
time
.
Duration
=
1
*
time
.
Second
...
...
@@ -164,6 +167,16 @@ func apiCallLatencyThreshold(numNodes int) time.Duration {
return
apiCallLatencyLargeThreshold
}
func
listPodsLatencyThreshold
(
numNodes
int
)
time
.
Duration
{
if
numNodes
<=
250
{
return
listPodLatencySmallThreshold
}
if
numNodes
<=
500
{
return
listPodLatencyMediumThreshold
}
return
listPodLatencyLargeThreshold
}
// Prints top five summary metrics for request types with latency and returns
// number of such request types above threshold.
func
HighLatencyRequests
(
c
*
client
.
Client
)
(
int
,
error
)
{
...
...
@@ -182,7 +195,7 @@ func HighLatencyRequests(c *client.Client) (int, error) {
for
_
,
metric
:=
range
metrics
.
APICalls
{
threshold
:=
apiCallLatencyThreshold
(
numNodes
)
if
metric
.
Verb
==
"LIST"
&&
metric
.
Resource
==
"pods"
{
threshold
=
listPod
LatencyThreshold
threshold
=
listPod
sLatencyThreshold
(
numNodes
)
}
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