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
3fb39542
Commit
3fb39542
authored
Jul 07, 2015
by
Piotr Szczesniak
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added load test with pods doing real works
parent
03c27916
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
15 deletions
+24
-15
e2e.sh
hack/jenkins/e2e.sh
+1
-1
load.go
test/e2e/load.go
+18
-11
util.go
test/e2e/util.go
+5
-3
No files found.
hack/jenkins/e2e.sh
View file @
3fb39542
...
...
@@ -166,7 +166,7 @@ case ${JOB_NAME} in
kubernetes-e2e-gce-scalability
)
:
${
E2E_CLUSTER_NAME
:
=
"jenkins-gce-e2e-scalability"
}
:
${
E2E_NETWORK
:
=
"e2e-scalability"
}
:
${
GINKGO_TEST_ARGS
:
=
"--ginkgo.focus=Performance
\s
suite
|should
\s
be
\s
able
\s
to
\s
handle
"
}
:
${
GINKGO_TEST_ARGS
:
=
"--ginkgo.focus=Performance
\s
suite"
}
:
${
KUBE_GCE_INSTANCE_PREFIX
:
=
"e2e-scalability"
}
:
${
PROJECT
:
=
"kubernetes-jenkins"
}
# Override GCE defaults.
...
...
test/e2e/load.go
View file @
3fb39542
...
...
@@ -33,7 +33,6 @@ import (
)
const
(
image
=
"gcr.io/google_containers/serve_hostname:1.1"
smallRCSize
=
5
mediumRCSize
=
30
bigRCSize
=
250
...
...
@@ -94,17 +93,22 @@ var _ = Describe("Load capacity", func() {
type
Load
struct
{
podsPerNode
int
image
string
command
[]
string
}
loadTests
:=
[]
Load
{
{
podsPerNode
:
30
},
// The container will consume 1 cpu and 512mb of memory.
{
podsPerNode
:
3
,
image
:
"jess/stress"
,
command
:
[]
string
{
"stress"
,
"-c"
,
"1"
,
"-m"
,
"2"
}},
{
podsPerNode
:
30
,
image
:
"gcr.io/google_containers/serve_hostname:1.1"
},
}
for
_
,
testArg
:=
range
loadTests
{
name
:=
fmt
.
Sprintf
(
"[Skipped] should be able to handle %v pods per node"
,
testArg
.
podsPerNode
)
name
:=
fmt
.
Sprintf
(
"[Skipped] [Performance suite] should be able to handle %v pods per node"
,
testArg
.
podsPerNode
)
itArg
:=
testArg
It
(
name
,
func
()
{
configs
=
generateRCConfigs
(
testArg
.
podsPerNode
*
nodeCount
,
c
,
ns
)
configs
=
generateRCConfigs
(
itArg
.
podsPerNode
*
nodeCount
,
itArg
.
image
,
itArg
.
command
,
c
,
ns
)
// Simulate lifetime of RC:
// * create with initial size
...
...
@@ -134,23 +138,25 @@ func computeRCCounts(total int) (int, int, int) {
// - 25 medium RCs each 30 pods
// - 3 big RCs each 250 pods
bigRCCount
:=
total
/
4
/
bigRCSize
mediumRCCount
:=
total
/
4
/
mediumRCSize
smallRCCount
:=
total
/
2
/
smallRCSize
total
-=
bigRCCount
*
bigRCSize
mediumRCCount
:=
total
/
3
/
mediumRCSize
total
-=
mediumRCCount
*
mediumRCSize
smallRCCount
:=
total
/
smallRCSize
return
smallRCCount
,
mediumRCCount
,
bigRCCount
}
func
generateRCConfigs
(
totalPods
int
,
c
*
client
.
Client
,
ns
string
)
[]
*
RCConfig
{
func
generateRCConfigs
(
totalPods
int
,
image
string
,
command
[]
string
,
c
*
client
.
Client
,
ns
string
)
[]
*
RCConfig
{
configs
:=
make
([]
*
RCConfig
,
0
)
smallRCCount
,
mediumRCCount
,
bigRCCount
:=
computeRCCounts
(
totalPods
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
smallRCGroupName
,
smallRCSize
,
smallRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
mediumRCGroupName
,
mediumRCSize
,
mediumRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
bigRCGroupName
,
bigRCSize
,
bigRCCount
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
smallRCGroupName
,
smallRCSize
,
smallRCCount
,
image
,
command
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
mediumRCGroupName
,
mediumRCSize
,
mediumRCCount
,
image
,
command
)
...
)
configs
=
append
(
configs
,
generateRCConfigsForGroup
(
c
,
ns
,
bigRCGroupName
,
bigRCSize
,
bigRCCount
,
image
,
command
)
...
)
return
configs
}
func
generateRCConfigsForGroup
(
c
*
client
.
Client
,
ns
,
groupName
string
,
size
,
count
int
)
[]
*
RCConfig
{
func
generateRCConfigsForGroup
(
c
*
client
.
Client
,
ns
,
groupName
string
,
size
,
count
int
,
image
string
,
command
[]
string
)
[]
*
RCConfig
{
configs
:=
make
([]
*
RCConfig
,
0
,
count
)
for
i
:=
1
;
i
<=
count
;
i
++
{
config
:=
&
RCConfig
{
...
...
@@ -159,6 +165,7 @@ func generateRCConfigsForGroup(c *client.Client, ns, groupName string, size, cou
Namespace
:
ns
,
Timeout
:
10
*
time
.
Minute
,
Image
:
image
,
Command
:
command
,
Replicas
:
size
,
}
configs
=
append
(
configs
,
config
)
...
...
test/e2e/util.go
View file @
3fb39542
...
...
@@ -159,6 +159,7 @@ func (s *podStore) Stop() {
type
RCConfig
struct
{
Client
*
client
.
Client
Image
string
Command
[]
string
Name
string
Namespace
string
PollInterval
time
.
Duration
...
...
@@ -1020,9 +1021,10 @@ func RunRC(config RCConfig) error {
Spec
:
api
.
PodSpec
{
Containers
:
[]
api
.
Container
{
{
Name
:
config
.
Name
,
Image
:
config
.
Image
,
Ports
:
[]
api
.
ContainerPort
{{
ContainerPort
:
80
}},
Name
:
config
.
Name
,
Image
:
config
.
Image
,
Command
:
config
.
Command
,
Ports
:
[]
api
.
ContainerPort
{{
ContainerPort
:
80
}},
},
},
},
...
...
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