Reverted vm_mhz_to_percentage: idle hosts are already handled in execute

This commit is contained in:
Anton Beloglazov 2012-10-24 14:27:34 +11:00
parent 490eb5e463
commit 535beba567
2 changed files with 0 additions and 10 deletions

View File

@ -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:]

View File

@ -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.])