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
0c787703
Commit
0c787703
authored
Jun 21, 2018
by
Shyam Jeedigunta
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Introduce scheduler CPU/Memory profile-gathering in density test
parent
457548ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
1 deletion
+14
-1
density.go
test/e2e/scalability/density.go
+14
-1
No files found.
test/e2e/scalability/density.go
View file @
0c787703
...
@@ -64,6 +64,9 @@ var MaxContainerFailures = 0
...
@@ -64,6 +64,9 @@ var MaxContainerFailures = 0
// Maximum no. of missing measurements related to pod-startup that the test tolerates.
// Maximum no. of missing measurements related to pod-startup that the test tolerates.
var
MaxMissingPodStartupMeasurements
=
0
var
MaxMissingPodStartupMeasurements
=
0
// Number of nodes in the cluster (computed inside BeforeEach).
var
nodeCount
=
0
type
DensityTestConfig
struct
{
type
DensityTestConfig
struct
{
Configs
[]
testutils
.
RunObjectConfig
Configs
[]
testutils
.
RunObjectConfig
ClientSets
[]
clientset
.
Interface
ClientSets
[]
clientset
.
Interface
...
@@ -285,6 +288,11 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
...
@@ -285,6 +288,11 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
replicationCtrlStartupPhase
:=
testPhaseDurations
.
StartPhase
(
300
,
"saturation pods creation"
)
replicationCtrlStartupPhase
:=
testPhaseDurations
.
StartPhase
(
300
,
"saturation pods creation"
)
defer
replicationCtrlStartupPhase
.
End
()
defer
replicationCtrlStartupPhase
.
End
()
// Start scheduler CPU profile-gatherer before we begin cluster saturation.
profileGatheringDelay
:=
time
.
Duration
(
1
+
nodeCount
/
100
)
*
time
.
Minute
schedulerProfilingStopCh
:=
framework
.
StartCPUProfileGatherer
(
"kube-scheduler"
,
"density"
,
profileGatheringDelay
)
// Start all replication controllers.
// Start all replication controllers.
startTime
:=
time
.
Now
()
startTime
:=
time
.
Now
()
wg
:=
sync
.
WaitGroup
{}
wg
:=
sync
.
WaitGroup
{}
...
@@ -304,10 +312,16 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
...
@@ -304,10 +312,16 @@ func runDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPhaseTi
wg
.
Wait
()
wg
.
Wait
()
startupTime
:=
time
.
Since
(
startTime
)
startupTime
:=
time
.
Since
(
startTime
)
close
(
logStopCh
)
close
(
logStopCh
)
close
(
schedulerProfilingStopCh
)
framework
.
Logf
(
"E2E startup time for %d pods: %v"
,
dtc
.
PodCount
,
startupTime
)
framework
.
Logf
(
"E2E startup time for %d pods: %v"
,
dtc
.
PodCount
,
startupTime
)
framework
.
Logf
(
"Throughput (pods/s) during cluster saturation phase: %v"
,
float32
(
dtc
.
PodCount
)
/
float32
(
startupTime
/
time
.
Second
))
framework
.
Logf
(
"Throughput (pods/s) during cluster saturation phase: %v"
,
float32
(
dtc
.
PodCount
)
/
float32
(
startupTime
/
time
.
Second
))
replicationCtrlStartupPhase
.
End
()
replicationCtrlStartupPhase
.
End
()
// Grabbing scheduler memory profile after cluster saturation finished.
wg
.
Add
(
1
)
framework
.
GatherMemoryProfile
(
"kube-scheduler"
,
"density"
,
&
wg
)
wg
.
Wait
()
printPodAllocationPhase
:=
testPhaseDurations
.
StartPhase
(
400
,
"printing pod allocation"
)
printPodAllocationPhase
:=
testPhaseDurations
.
StartPhase
(
400
,
"printing pod allocation"
)
defer
printPodAllocationPhase
.
End
()
defer
printPodAllocationPhase
.
End
()
// Print some data about Pod to Node allocation
// Print some data about Pod to Node allocation
...
@@ -366,7 +380,6 @@ func cleanupDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPha
...
@@ -366,7 +380,6 @@ func cleanupDensityTest(dtc DensityTestConfig, testPhaseDurations *timer.TestPha
// limits on Docker's concurrent container startup.
// limits on Docker's concurrent container startup.
var
_
=
SIGDescribe
(
"Density"
,
func
()
{
var
_
=
SIGDescribe
(
"Density"
,
func
()
{
var
c
clientset
.
Interface
var
c
clientset
.
Interface
var
nodeCount
int
var
additionalPodsPrefix
string
var
additionalPodsPrefix
string
var
ns
string
var
ns
string
var
uuid
string
var
uuid
string
...
...
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