Reverted vm_mhz_to_percentage: idle hosts are already handled in execute
This commit is contained in:
parent
490eb5e463
commit
535beba567
@ -431,9 +431,6 @@ def vm_mhz_to_percentage(vm_mhz_history, host_mhz_history, physical_cpu_mhz):
|
||||
:return: The history of the host's CPU utilization in percentages.
|
||||
:rtype: list(float)
|
||||
"""
|
||||
if not vm_mhz_history:
|
||||
return [0.]
|
||||
|
||||
max_len = max(len(x) for x in vm_mhz_history)
|
||||
if len(host_mhz_history) > max_len:
|
||||
host_mhz_history = host_mhz_history[-max_len:]
|
||||
|
@ -195,10 +195,3 @@ class LocalManager(TestCase):
|
||||
[300, 0, 300, 0, 300],
|
||||
3000),
|
||||
[0.1, 0.2, 0.2, 0.5])
|
||||
|
||||
self.assertEqual(manager.vm_mhz_to_percentage(
|
||||
[],
|
||||
[300, 0, 300, 0, 300],
|
||||
3000),
|
||||
[0.])
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user