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
979a8d73
Commit
979a8d73
authored
May 30, 2018
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Compute avg and quantiles of scheduler throughput in density test
parent
15cd3552
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
32 additions
and
2 deletions
+32
-2
metrics_util.go
test/e2e/framework/metrics_util.go
+4
-1
density.go
test/e2e/scalability/density.go
+28
-1
No files found.
test/e2e/framework/metrics_util.go
View file @
979a8d73
...
@@ -210,7 +210,10 @@ type SchedulingMetrics struct {
...
@@ -210,7 +210,10 @@ type SchedulingMetrics struct {
SchedulingLatency
LatencyMetric
`json:"schedulingLatency"`
SchedulingLatency
LatencyMetric
`json:"schedulingLatency"`
BindingLatency
LatencyMetric
`json:"bindingLatency"`
BindingLatency
LatencyMetric
`json:"bindingLatency"`
E2ELatency
LatencyMetric
`json:"e2eLatency"`
E2ELatency
LatencyMetric
`json:"e2eLatency"`
ThroughputSamples
[]
float64
`json:"throughputSamples"`
ThroughputAverage
float64
`json:"throughputAverage"`
ThroughputPerc50
float64
`json:"throughputPerc50"`
ThroughputPerc90
float64
`json:"throughputPerc90"`
ThroughputPerc99
float64
`json:"throughputPerc99"`
}
}
func
(
l
*
SchedulingMetrics
)
SummaryKind
()
string
{
func
(
l
*
SchedulingMetrics
)
SummaryKind
()
string
{
...
...
test/e2e/scalability/density.go
View file @
979a8d73
...
@@ -222,6 +222,24 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
...
@@ -222,6 +222,24 @@ func density30AddonResourceVerifier(numNodes int) map[string]framework.ResourceC
return
constraints
return
constraints
}
}
func
computeAverage
(
sample
[]
float64
)
float64
{
sum
:=
0.0
for
_
,
value
:=
range
sample
{
sum
+=
value
}
return
sum
/
float64
(
len
(
sample
))
}
func
computeQuantile
(
sample
[]
float64
,
quantile
float64
)
float64
{
Expect
(
sort
.
Float64sAreSorted
(
sample
))
.
To
(
Equal
(
true
))
Expect
(
quantile
>=
0.0
&&
quantile
<=
1.0
)
.
To
(
Equal
(
true
))
index
:=
int
(
quantile
*
float64
(
len
(
sample
)))
-
1
if
index
<
0
{
return
math
.
NaN
()
}
return
sample
[
index
]
}
func
logPodStartupStatus
(
func
logPodStartupStatus
(
c
clientset
.
Interface
,
c
clientset
.
Interface
,
expectedPods
int
,
expectedPods
int
,
...
@@ -400,7 +418,16 @@ var _ = SIGDescribe("Density", func() {
...
@@ -400,7 +418,16 @@ var _ = SIGDescribe("Density", func() {
latency
,
err
:=
framework
.
VerifySchedulerLatency
(
c
)
latency
,
err
:=
framework
.
VerifySchedulerLatency
(
c
)
framework
.
ExpectNoError
(
err
)
framework
.
ExpectNoError
(
err
)
if
err
==
nil
{
if
err
==
nil
{
latency
.
ThroughputSamples
=
scheduleThroughputs
// Compute avg and quantiles of throughput (excluding last element, that's usually an outlier).
sampleSize
:=
len
(
scheduleThroughputs
)
if
sampleSize
>
1
{
scheduleThroughputs
=
scheduleThroughputs
[
:
sampleSize
-
1
]
sort
.
Float64s
(
scheduleThroughputs
)
latency
.
ThroughputAverage
=
computeAverage
(
scheduleThroughputs
)
latency
.
ThroughputPerc50
=
computeQuantile
(
scheduleThroughputs
,
0.5
)
latency
.
ThroughputPerc90
=
computeQuantile
(
scheduleThroughputs
,
0.9
)
latency
.
ThroughputPerc99
=
computeQuantile
(
scheduleThroughputs
,
0.99
)
}
summaries
=
append
(
summaries
,
latency
)
summaries
=
append
(
summaries
,
latency
)
}
}
summaries
=
append
(
summaries
,
testPhaseDurations
)
summaries
=
append
(
summaries
,
testPhaseDurations
)
...
...
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