mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-24 04:06:03 +00:00
Merge pull request #19471 from gmarek/analyzer_k8s_changes
Changes required for test analyzer
This commit is contained in:
commit
d8041b1d4d
@ -48,14 +48,14 @@ type containerResourceGatherer struct {
|
||||
wg sync.WaitGroup
|
||||
}
|
||||
|
||||
type singleContainerSummary struct {
|
||||
type SingleContainerSummary struct {
|
||||
Name string
|
||||
Cpu float64
|
||||
Mem int64
|
||||
}
|
||||
|
||||
// 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 {
|
||||
buf := &bytes.Buffer{}
|
||||
@ -117,7 +117,7 @@ func (g *containerResourceGatherer) stopAndSummarize(percentiles []int, constrai
|
||||
for _, perc := range percentiles {
|
||||
for _, name := range sortedKeys {
|
||||
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,
|
||||
Cpu: usage.CPUUsageInCores,
|
||||
Mem: usage.MemoryWorkingSetInBytes,
|
||||
|
Loading…
Reference in New Issue
Block a user