mirror of
https://github.com/ARM-software/workload-automation.git
synced 2025-09-01 19:02:31 +01:00
Replaced active_cpus by online_cpus in common/linux/device.py
This commit is contained in:
@@ -518,10 +518,10 @@ class BaseLinuxDevice(Device): # pylint: disable=abstract-method
|
||||
def get_number_of_online_cores(self, core):
|
||||
if core not in self.core_names:
|
||||
raise ValueError('Unexpected core: {}; must be in {}'.format(core, list(set(self.core_names))))
|
||||
active_cpus = self.active_cpus
|
||||
online_cpus = self.online_cpus
|
||||
num_active_cores = 0
|
||||
for i, c in enumerate(self.core_names):
|
||||
if c == core and i in active_cpus:
|
||||
if c == core and i in online_cpus:
|
||||
num_active_cores += 1
|
||||
return num_active_cores
|
||||
|
||||
|
Reference in New Issue
Block a user