From 2cf30f647652536aa4cc2b9691066ae81d5f8010 Mon Sep 17 00:00:00 2001 From: "Joe Talerico (rook)" Date: Fri, 15 Nov 2024 13:50:44 -0500 Subject: [PATCH] Update pkg/metrics/system.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Raúl Sevilla --- pkg/metrics/system.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/metrics/system.go b/pkg/metrics/system.go index 34ab9f4..a8483b1 100644 --- a/pkg/metrics/system.go +++ b/pkg/metrics/system.go @@ -174,7 +174,7 @@ func QueryNodeCPU(node NodeInfo, conn PromConnect, start time.Time, end time.Tim return cpu, true } -// TopPodCPU will return the top 5 CPU consumers for a specific node +// TopPodCPU will return the top 10 CPU consumers for a specific node func TopPodCPU(node NodeInfo, conn PromConnect, start time.Time, end time.Time) (PodValues, bool) { var pods PodValues query := fmt.Sprintf("topk(10,sum(irate(container_cpu_usage_seconds_total{name!=\"\",instance=~\"%s:.*\"}[2m]) * 100) by (pod, namespace, instance))", node.IP)