mirror of
https://github.com/optim-enterprises-bv/kubernetes.git
synced 2025-11-03 03:38:15 +00:00
node: e2e: topology-mgr: Determine threads per core
Signed-off-by: Swati Sehgal <swsehgal@redhat.com>
This commit is contained in:
@@ -88,6 +88,16 @@ func detectCoresPerSocket() int {
|
||||
return coreCount
|
||||
}
|
||||
|
||||
func detectThreadPerCore() int {
|
||||
outData, err := exec.Command("/bin/sh", "-c", "lscpu | grep \"Thread(s) per core:\" | cut -d \":\" -f 2").Output()
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
threadCount, err := strconv.Atoi(strings.TrimSpace(string(outData)))
|
||||
framework.ExpectNoError(err)
|
||||
|
||||
return threadCount
|
||||
}
|
||||
|
||||
func makeContainers(ctnCmd string, ctnAttributes []tmCtnAttribute) (ctns []v1.Container) {
|
||||
for _, ctnAttr := range ctnAttributes {
|
||||
ctn := v1.Container{
|
||||
|
||||
Reference in New Issue
Block a user