mirror of
https://github.com/ClusterCockpit/cc-metric-collector.git
synced 2025-04-08 14:35:55 +02:00
Do renaming in other parts
This commit is contained in:
parent
d8b2dc2455
commit
05806d3e97
@ -133,7 +133,7 @@ func (m *LikwidCollector) Init(config json.RawMessage) error {
|
|||||||
|
|
||||||
m.meta = map[string]string{"source": m.name, "group": "PerfCounter"}
|
m.meta = map[string]string{"source": m.name, "group": "PerfCounter"}
|
||||||
cclog.ComponentDebug(m.name, "Get cpulist and init maps and lists")
|
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.cpulist = make([]C.int, len(cpulist))
|
||||||
m.cpu2tid = make(map[int]int)
|
m.cpu2tid = make(map[int]int)
|
||||||
for i, c := range cpulist {
|
for i, c := range cpulist {
|
||||||
|
@ -246,7 +246,7 @@ func matchfunc(args ...interface{}) (interface{}, error) {
|
|||||||
func getCpuCoreFunc(args ...interface{}) (interface{}, error) {
|
func getCpuCoreFunc(args ...interface{}) (interface{}, error) {
|
||||||
switch cpuid := args[0].(type) {
|
switch cpuid := args[0].(type) {
|
||||||
case int:
|
case int:
|
||||||
return topo.GetCpuCore(cpuid), nil
|
return topo.GetHwthreadCore(cpuid), nil
|
||||||
}
|
}
|
||||||
return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid")
|
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) {
|
func getCpuSocketFunc(args ...interface{}) (interface{}, error) {
|
||||||
switch cpuid := args[0].(type) {
|
switch cpuid := args[0].(type) {
|
||||||
case int:
|
case int:
|
||||||
return topo.GetCpuSocket(cpuid), nil
|
return topo.GetHwthreadSocket(cpuid), nil
|
||||||
}
|
}
|
||||||
return -1, errors.New("function 'getCpuCore' accepts only an 'int' cpuid")
|
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) {
|
func getCpuNumaDomainFunc(args ...interface{}) (interface{}, error) {
|
||||||
switch cpuid := args[0].(type) {
|
switch cpuid := args[0].(type) {
|
||||||
case int:
|
case int:
|
||||||
return topo.GetCpuNumaDomain(cpuid), nil
|
return topo.GetHwthreadNumaDomain(cpuid), nil
|
||||||
}
|
}
|
||||||
return -1, errors.New("function 'getCpuNuma' accepts only an 'int' cpuid")
|
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) {
|
func getCpuDieFunc(args ...interface{}) (interface{}, error) {
|
||||||
switch cpuid := args[0].(type) {
|
switch cpuid := args[0].(type) {
|
||||||
case int:
|
case int:
|
||||||
return topo.GetCpuDie(cpuid), nil
|
return topo.GetHwthreadDie(cpuid), nil
|
||||||
}
|
}
|
||||||
return -1, errors.New("function 'getCpuDie' accepts only an 'int' cpuid")
|
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
|
// wrapper function to get a list of all cpuids of the node
|
||||||
func getCpuListOfNode(args ...interface{}) (interface{}, error) {
|
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)
|
// 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:
|
case string:
|
||||||
switch typ {
|
switch typ {
|
||||||
case "node":
|
case "node":
|
||||||
return topo.CpuList(), nil
|
return topo.HwthreadList(), nil
|
||||||
case "socket":
|
case "socket":
|
||||||
return getCpuListOfSocketFunc(args[1])
|
return getCpuListOfSocketFunc(args[1])
|
||||||
case "numadomain":
|
case "numadomain":
|
||||||
|
Loading…
x
Reference in New Issue
Block a user