feature #1977: Deal with ruby 1.8.7

This commit is contained in:
Tino Vazquez committed 2013-05-17 19:22:35 +02:00
1 parent ef312ceba5
commit 604eb703b4
1 file changed
+2 -2
+2 -2
View File
@@ -223,7 +223,7 @@ class VIDriver
# -------------------------------------------------------------------------#
def get_host_used_cpu
overallCpuUsage = @host.summary.quickStats.overallCpuUsage.to_f
(overallCpuUsage / (@cpuMhz * @numCpuCores)).round(3)*100
(overallCpuUsage / (@cpuMhz * @numCpuCores)).round()
end
# -------------------------------------------------------------------------#
@@ -257,7 +257,7 @@ class VIDriver
# Get percentage of the CPU used by a VM in a host
def get_used_cpu(vm)
overallCpuUsage = vm.summary.quickStats.overallCpuUsage.to_f
((overallCpuUsage / (@cpuMhz * @numCpuCores)).round(3)*100).to_s
((overallCpuUsage / (@cpuMhz * @numCpuCores)).round()).to_s
end
# -------------------------------------------------------------------------#