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
1b96e92c
Commit
1b96e92c
authored
Oct 29, 2015
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #16428 from wojtek-t/fix_latency_test
Auto commit by PR queue bot
parents
720dc879
c053ef2a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
density.go
test/e2e/density.go
+4
-3
No files found.
test/e2e/density.go
View file @
1b96e92c
...
...
@@ -63,9 +63,10 @@ func (a latencySlice) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
func
(
a
latencySlice
)
Less
(
i
,
j
int
)
bool
{
return
a
[
i
]
.
Latency
<
a
[
j
]
.
Latency
}
func
extractLatencyMetrics
(
latencies
[]
podLatencyData
)
LatencyMetric
{
perc50
:=
latencies
[
len
(
latencies
)
/
2
]
.
Latency
perc90
:=
latencies
[(
len
(
latencies
)
*
9
)
/
10
]
.
Latency
perc99
:=
latencies
[(
len
(
latencies
)
*
99
)
/
100
]
.
Latency
length
:=
len
(
latencies
)
perc50
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
50
)
/
100
))
-
1
]
.
Latency
perc90
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
90
)
/
100
))
-
1
]
.
Latency
perc99
:=
latencies
[
int
(
math
.
Ceil
(
float64
(
length
*
99
)
/
100
))
-
1
]
.
Latency
return
LatencyMetric
{
Perc50
:
perc50
,
Perc90
:
perc90
,
Perc99
:
perc99
}
}
...
...
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