From a288cda29c8b22c2bc2dd36342ab3c35bca01113 Mon Sep 17 00:00:00 2001 From: Stefan Derkits Date: Mon, 10 Jun 2013 19:28:29 +0200 Subject: [PATCH] change utilization to only take current CPU/Size/RAM into account --- src/at/ac/tuwien/lsdc/types/PhysicalMachine.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/at/ac/tuwien/lsdc/types/PhysicalMachine.java b/src/at/ac/tuwien/lsdc/types/PhysicalMachine.java index 292df62..f775784 100644 --- a/src/at/ac/tuwien/lsdc/types/PhysicalMachine.java +++ b/src/at/ac/tuwien/lsdc/types/PhysicalMachine.java @@ -130,15 +130,15 @@ public class PhysicalMachine { } public double getSizeUtilization() { - return ((double) (reservedSize - initialSize) / (maxSize - initialSize)) * 100; + return ((double) (getCurrentSize() - initialSize) / (maxSize - initialSize)) * 100; } public double getRamUtilization() { - return ((double) (reservedRAM - initialRAM) / (maxRAM - initialRAM)) * 100; + return ((double) (getCurrentRam() - initialRAM) / (maxRAM - initialRAM)) * 100; } public double getCpuUtilization() { - return ((double) (reservedCPU - initialCPU) / (maxCPU - initialCPU)) * 100; + return ((double) (getCurrentCPU() - initialCPU) / (maxCPU - initialCPU)) * 100; } public double getAverageUtilization() { -- 2.43.0