DaanHoogland commented on code in PR #6414:
URL: https://github.com/apache/cloudstack/pull/6414#discussion_r884473133


##########
plugins/hypervisors/vmware/src/main/java/com/cloud/hypervisor/vmware/resource/VmwareResource.java:
##########
@@ -6535,7 +6535,10 @@ private HashMap<String, VmStatsEntry> 
getVmStats(List<String> vmNames) throws Ex
                         }
                     }
 
-                    final VmStatsEntry vmStats = new VmStatsEntry(0, 
NumberUtils.toDouble(memkb) * 1024, NumberUtils.toDouble(guestMemusage) * 1024, 
NumberUtils.toDouble(memlimit) * 1024,
+                    double doubleMemKb = NumberUtils.toDouble(memkb)
+                    double guestFreeMem =  doubleMemKb - 
NumberUtils.toDouble(guestMemusage);
+
+                    final VmStatsEntry vmStats = new VmStatsEntry(0, 
doubleMemKb * 1024, guestFreeMem * 1024, NumberUtils.toDouble(memlimit) * 1024, 
NumberUtils.toDouble(memlimit) * 1024,

Review Comment:
   if I count correctly, you are replacing 4 for 5 parameters to the 
constructor on VmStatsEntry. It takes 13 and now has 14 in the call. I don“t 
see a change to the constructor itself.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to