mirror of
https://github.com/OpenNebula/one.git
synced 2026-11-20 20:02:38 +09:00
feature #1977: Deal with ruby 1.8.7
This commit is contained in:
1 parent
ef312ceba5
commit
604eb703b4
1 file changed
+2
-2
@@ -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
|
||||
|
||||
# -------------------------------------------------------------------------#
|
||||
|
||||
Reference in new issue
Block a user