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
f6ea2a61
Commit
f6ea2a61
authored
Sep 26, 2017
by
tanshanshan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improve code
parent
b188868f
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
6 deletions
+9
-6
density_test.go
test/e2e_node/density_test.go
+2
-2
docker_util.go
test/e2e_node/docker_util.go
+1
-1
image_list.go
test/e2e_node/image_list.go
+5
-2
resource_collector.go
test/e2e_node/resource_collector.go
+1
-1
No files found.
test/e2e_node/density_test.go
View file @
f6ea2a61
...
@@ -524,7 +524,7 @@ func newInformerWatchPod(f *framework.Framework, mutex *sync.Mutex, watchTimes m
...
@@ -524,7 +524,7 @@ func newInformerWatchPod(f *framework.Framework, mutex *sync.Mutex, watchTimes m
return
controller
return
controller
}
}
// createBatchPodSequential creats pods back-to-back in sequence.
// createBatchPodSequential creat
e
s pods back-to-back in sequence.
func
createBatchPodSequential
(
f
*
framework
.
Framework
,
pods
[]
*
v1
.
Pod
)
(
time
.
Duration
,
[]
framework
.
PodLatencyData
)
{
func
createBatchPodSequential
(
f
*
framework
.
Framework
,
pods
[]
*
v1
.
Pod
)
(
time
.
Duration
,
[]
framework
.
PodLatencyData
)
{
batchStartTime
:=
metav1
.
Now
()
batchStartTime
:=
metav1
.
Now
()
e2eLags
:=
make
([]
framework
.
PodLatencyData
,
0
)
e2eLags
:=
make
([]
framework
.
PodLatencyData
,
0
)
...
@@ -570,7 +570,7 @@ func logPodCreateThroughput(batchLag time.Duration, e2eLags []framework.PodLaten
...
@@ -570,7 +570,7 @@ func logPodCreateThroughput(batchLag time.Duration, e2eLags []framework.PodLaten
logPerfData
(
getThroughputPerfData
(
batchLag
,
e2eLags
,
podsNr
,
testInfo
),
"throughput"
)
logPerfData
(
getThroughputPerfData
(
batchLag
,
e2eLags
,
podsNr
,
testInfo
),
"throughput"
)
}
}
//
increase
KubeletAPIQPSLimit sets Kubelet API QPS via ConfigMap. Kubelet will restart with the new QPS.
//
set
KubeletAPIQPSLimit sets Kubelet API QPS via ConfigMap. Kubelet will restart with the new QPS.
func
setKubeletAPIQPSLimit
(
f
*
framework
.
Framework
,
newAPIQPS
int32
)
{
func
setKubeletAPIQPSLimit
(
f
*
framework
.
Framework
,
newAPIQPS
int32
)
{
const
restartGap
=
40
*
time
.
Second
const
restartGap
=
40
*
time
.
Second
...
...
test/e2e_node/docker_util.go
View file @
f6ea2a61
...
@@ -87,7 +87,7 @@ func isDockerLiveRestoreEnabled() (bool, error) {
...
@@ -87,7 +87,7 @@ func isDockerLiveRestoreEnabled() (bool, error) {
return
info
.
LiveRestoreEnabled
,
nil
return
info
.
LiveRestoreEnabled
,
nil
}
}
// st
op
DockerDaemon starts the Docker daemon.
// st
art
DockerDaemon starts the Docker daemon.
func
startDockerDaemon
()
error
{
func
startDockerDaemon
()
error
{
switch
{
switch
{
case
systemdutil
.
IsRunningSystemd
()
:
case
systemdutil
.
IsRunningSystemd
()
:
...
...
test/e2e_node/image_list.go
View file @
f6ea2a61
...
@@ -92,8 +92,11 @@ func (rp *remotePuller) Name() string {
...
@@ -92,8 +92,11 @@ func (rp *remotePuller) Name() string {
}
}
func
(
rp
*
remotePuller
)
Pull
(
image
string
)
([]
byte
,
error
)
{
func
(
rp
*
remotePuller
)
Pull
(
image
string
)
([]
byte
,
error
)
{
// TODO(runcom): should we check if the image is already pulled with ImageStatus?
imageStatus
,
err
:=
rp
.
imageService
.
ImageStatus
(
&
runtimeapi
.
ImageSpec
{
Image
:
image
})
_
,
err
:=
rp
.
imageService
.
PullImage
(
&
runtimeapi
.
ImageSpec
{
Image
:
image
},
nil
)
if
err
==
nil
&&
imageStatus
!=
nil
{
return
nil
,
nil
}
_
,
err
=
rp
.
imageService
.
PullImage
(
&
runtimeapi
.
ImageSpec
{
Image
:
image
},
nil
)
return
nil
,
err
return
nil
,
err
}
}
...
...
test/e2e_node/resource_collector.go
View file @
f6ea2a61
...
@@ -534,7 +534,7 @@ func getContainer(pid int) (string, error) {
...
@@ -534,7 +534,7 @@ func getContainer(pid int) (string, error) {
return
""
,
cgroups
.
NewNotFoundError
(
"memory"
)
return
""
,
cgroups
.
NewNotFoundError
(
"memory"
)
}
}
// since we use this container for accounting, we need to ensure its a unified hierarchy.
// since we use this container for accounting, we need to ensure it
i
s a unified hierarchy.
if
cpu
!=
memory
{
if
cpu
!=
memory
{
return
""
,
fmt
.
Errorf
(
"cpu and memory cgroup hierarchy not unified. cpu: %s, memory: %s"
,
cpu
,
memory
)
return
""
,
fmt
.
Errorf
(
"cpu and memory cgroup hierarchy not unified. cpu: %s, memory: %s"
,
cpu
,
memory
)
}
}
...
...
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