From 05806d3e97780dcac464f1971a1fda59957876a4 Mon Sep 17 00:00:00 2001 From: Thomas Roehl Date: Tue, 22 Mar 2022 16:52:36 +0100 Subject: [PATCH] Do renaming in other parts --- collectors/likwidMetric.go | 2 +- .../metricAggregator/metricAggregatorFunctions.go | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/collectors/likwidMetric.go b/collectors/likwidMetric.go index 85bd932..de66920 100644 --- a/collectors/likwidMetric.go +++ b/collectors/likwidMetric.go @@ -133,7 +133,7 @@ func (m *LikwidCollector) Init(config json.RawMessage) error { m.meta = map[string]string{"source": m.name, "group": "PerfCounter"} cclog.ComponentDebug(m.name, "Get cpulist and init maps and lists") - cpulist := topo.CpuList() + cpulist := topo.HwthreadList() m.cpulist = make([]C.int, len(cpulist)) m.cpu2tid = make(map[int]int) for i, c := range cpulist { diff --git a/internal/metricAggregator/metricAggregatorFunctions.go b/internal/metricAggregator/metricAggregatorFunctions.go index 1fbef65..a972adc 100644 --- a/internal/metricAggregator/metricAggregatorFunctions.go +++ b/internal/metricAggregator/metricAggregatorFunctions.go @@ -246,7 +246,7 @@ func matchfunc(args ...interface{}) (interface{}, error) { func getCpuCoreFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuCore(cpuid), nil + return topo.GetHwthreadCore(cpuid), nil } return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid") } @@ -255,7 +255,7 @@ func getCpuCoreFunc(args ...interface{}) (interface{}, error) { func getCpuSocketFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuSocket(cpuid), nil + return topo.GetHwthreadSocket(cpuid), nil } return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid") } @@ -264,7 +264,7 @@ func getCpuSocketFunc(args ...interface{}) (interface{}, error) { func getCpuNumaDomainFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuNumaDomain(cpuid), nil + return topo.GetHwthreadNumaDomain(cpuid), nil } return -1, errors.New("function 'getCpuNuma' accepts only an 'int' cpuid") } @@ -273,7 +273,7 @@ func getCpuNumaDomainFunc(args ...interface{}) (interface{}, error) { func getCpuDieFunc(args ...interface{}) (interface{}, error) { switch cpuid := args[0].(type) { case int: - return topo.GetCpuDie(cpuid), nil + return topo.GetHwthreadDie(cpuid), nil } return -1, errors.New("function 'getCpuDie' accepts only an 'int' cpuid") } @@ -336,7 +336,7 @@ func getCpuListOfDieFunc(args ...interface{}) (interface{}, error) { // wrapper function to get a list of all cpuids of the node func getCpuListOfNode(args ...interface{}) (interface{}, error) { - return topo.CpuList(), nil + return topo.HwthreadList(), nil } // helper function to get the cpuid list for a CCMetric type tag set (type and type-id) @@ -348,7 +348,7 @@ func getCpuListOfType(args ...interface{}) (interface{}, error) { case string: switch typ { case "node": - return topo.CpuList(), nil + return topo.HwthreadList(), nil case "socket": return getCpuListOfSocketFunc(args[1]) case "numadomain":