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
07e9bd82
Commit
07e9bd82
authored
Feb 24, 2016
by
k8s-merge-robot
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #21759 from gmarek/refactor-gatherer
Auto commit by PR queue bot
parents
c88f859f
ac706ea1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
3 deletions
+8
-3
framework.go
test/e2e/framework.go
+8
-3
resource_usage_gatherer.go
test/e2e/resource_usage_gatherer.go
+0
-0
No files found.
test/e2e/framework.go
View file @
07e9bd82
...
@@ -51,7 +51,7 @@ type Framework struct {
...
@@ -51,7 +51,7 @@ type Framework struct {
namespacesToDelete
[]
*
api
.
Namespace
// Some tests have more than one.
namespacesToDelete
[]
*
api
.
Namespace
// Some tests have more than one.
NamespaceDeletionTimeout
time
.
Duration
NamespaceDeletionTimeout
time
.
Duration
gatherer
containerResourceGatherer
gatherer
*
containerResourceGatherer
// Constraints that passed to a check which is executed after data is gathered to
// Constraints that passed to a check which is executed after data is gathered to
// see if 99% of results are within acceptable bounds. It as to be injected in the test,
// see if 99% of results are within acceptable bounds. It as to be injected in the test,
// as expectations vary greatly. Constraints are groupped by the container names.
// as expectations vary greatly. Constraints are groupped by the container names.
...
@@ -116,7 +116,12 @@ func (f *Framework) beforeEach() {
...
@@ -116,7 +116,12 @@ func (f *Framework) beforeEach() {
}
}
if
testContext
.
GatherKubeSystemResourceUsageData
{
if
testContext
.
GatherKubeSystemResourceUsageData
{
f
.
gatherer
.
startGatheringData
(
c
,
resourceDataGatheringPeriodSeconds
*
time
.
Second
)
f
.
gatherer
,
err
=
NewResourceUsageGatherer
(
c
)
if
err
!=
nil
{
Logf
(
"Error while creating NewResourceUsageGatherer: %v"
,
err
)
}
else
{
go
f
.
gatherer
.
startGatheringData
()
}
}
}
if
testContext
.
GatherLogsSizes
{
if
testContext
.
GatherLogsSizes
{
...
@@ -170,7 +175,7 @@ func (f *Framework) afterEach() {
...
@@ -170,7 +175,7 @@ func (f *Framework) afterEach() {
}
}
summaries
:=
make
([]
TestDataSummary
,
0
)
summaries
:=
make
([]
TestDataSummary
,
0
)
if
testContext
.
GatherKubeSystemResourceUsageData
{
if
testContext
.
GatherKubeSystemResourceUsageData
&&
f
.
gatherer
!=
nil
{
By
(
"Collecting resource usage data"
)
By
(
"Collecting resource usage data"
)
summaries
=
append
(
summaries
,
f
.
gatherer
.
stopAndSummarize
([]
int
{
90
,
99
},
f
.
addonResourceConstraints
))
summaries
=
append
(
summaries
,
f
.
gatherer
.
stopAndSummarize
([]
int
{
90
,
99
},
f
.
addonResourceConstraints
))
}
}
...
...
test/e2e/resource_usage_gatherer.go
View file @
07e9bd82
This diff is collapsed.
Click to expand it.
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