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
1dba9282
Commit
1dba9282
authored
Jan 11, 2016
by
gmarek
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changes required for test analyzer
parent
1020b436
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
resource_usage_gatherer.go
test/e2e/resource_usage_gatherer.go
+3
-3
No files found.
test/e2e/resource_usage_gatherer.go
View file @
1dba9282
...
@@ -48,14 +48,14 @@ type containerResourceGatherer struct {
...
@@ -48,14 +48,14 @@ type containerResourceGatherer struct {
wg
sync
.
WaitGroup
wg
sync
.
WaitGroup
}
}
type
s
ingleContainerSummary
struct
{
type
S
ingleContainerSummary
struct
{
Name
string
Name
string
Cpu
float64
Cpu
float64
Mem
int64
Mem
int64
}
}
// we can't have int here, as JSON does not accept integer keys.
// we can't have int here, as JSON does not accept integer keys.
type
ResourceUsageSummary
map
[
string
][]
s
ingleContainerSummary
type
ResourceUsageSummary
map
[
string
][]
S
ingleContainerSummary
func
(
s
*
ResourceUsageSummary
)
PrintHumanReadable
()
string
{
func
(
s
*
ResourceUsageSummary
)
PrintHumanReadable
()
string
{
buf
:=
&
bytes
.
Buffer
{}
buf
:=
&
bytes
.
Buffer
{}
...
@@ -117,7 +117,7 @@ func (g *containerResourceGatherer) stopAndSummarize(percentiles []int, constrai
...
@@ -117,7 +117,7 @@ func (g *containerResourceGatherer) stopAndSummarize(percentiles []int, constrai
for
_
,
perc
:=
range
percentiles
{
for
_
,
perc
:=
range
percentiles
{
for
_
,
name
:=
range
sortedKeys
{
for
_
,
name
:=
range
sortedKeys
{
usage
:=
stats
[
perc
][
name
]
usage
:=
stats
[
perc
][
name
]
summary
[
strconv
.
Itoa
(
perc
)]
=
append
(
summary
[
strconv
.
Itoa
(
perc
)],
s
ingleContainerSummary
{
summary
[
strconv
.
Itoa
(
perc
)]
=
append
(
summary
[
strconv
.
Itoa
(
perc
)],
S
ingleContainerSummary
{
Name
:
name
,
Name
:
name
,
Cpu
:
usage
.
CPUUsageInCores
,
Cpu
:
usage
.
CPUUsageInCores
,
Mem
:
usage
.
MemoryWorkingSetInBytes
,
Mem
:
usage
.
MemoryWorkingSetInBytes
,
...
...
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