Commit 1dba9282 authored by gmarek's avatar gmarek

Changes required for test analyzer

parent 1020b436
...@@ -48,14 +48,14 @@ type containerResourceGatherer struct { ...@@ -48,14 +48,14 @@ type containerResourceGatherer struct {
wg sync.WaitGroup wg sync.WaitGroup
} }
type singleContainerSummary struct { type SingleContainerSummary 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][]singleContainerSummary type ResourceUsageSummary map[string][]SingleContainerSummary
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)], singleContainerSummary{ summary[strconv.Itoa(perc)] = append(summary[strconv.Itoa(perc)], SingleContainerSummary{
Name: name, Name: name,
Cpu: usage.CPUUsageInCores, Cpu: usage.CPUUsageInCores,
Mem: usage.MemoryWorkingSetInBytes, Mem: usage.MemoryWorkingSetInBytes,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment