From fdeb29bd40c258f820d3b2cd1d36a25cd9a14650 Mon Sep 17 00:00:00 2001 From: "Harper, Jason M" Date: Thu, 20 Nov 2025 11:35:41 -0800 Subject: [PATCH] fix: CHAs per socket value for metric formulas Signed-off-by: Harper, Jason M --- cmd/metrics/loader_util.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/metrics/loader_util.go b/cmd/metrics/loader_util.go index cfa77914..8ed2db09 100644 --- a/cmd/metrics/loader_util.go +++ b/cmd/metrics/loader_util.go @@ -166,7 +166,7 @@ func replaceConstants(metrics []MetricDefinition, metadata Metadata) ([]MetricDe return nil, fmt.Errorf("unknown granularity: %s", flagGranularity) } coresPerSocket := fmt.Sprintf("%f", float64(metadata.CoresPerSocket)) - chasPerSocket := fmt.Sprintf("%f", float64(len(metadata.UncoreDeviceIDs["cha"]))) + chasPerSocket := fmt.Sprintf("%f", float64(len(metadata.UncoreDeviceIDs["cha"]))/float64(metadata.SocketCount)) socketCount := fmt.Sprintf("%f", float64(metadata.SocketCount)) hyperThreadingOn := fmt.Sprintf("%t", metadata.ThreadsPerCore > 1) threadsPerCore := fmt.Sprintf("%f", float64(metadata.ThreadsPerCore))