@Test public void testGetHostPredictedEnergy() { System.out.println("getHostPredictedEnergy"); EnergyUsagePrediction prediction; addVMs(vm1); addVMs(vm2); CpuOnlySplinePolynomialEnergyPredictor predictor = new CpuOnlySplinePolynomialEnergyPredictor(); host = setCalibrationData(host); host.setRamMb(32244); prediction = predictor.getHostPredictedEnergy(host, vms); System.out.println("Host: " + host.getHostName()); System.out.println("VM Count: " + vms.size()); System.out.println("store values size is: " + host.getCalibrationData().size()); System.out.println("watts: " + prediction.getAvgPowerUsed() + " energy: " + prediction.getTotalEnergyUsed()); }
@Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction wattsUsed; if (getDefaultAssumedCpuUsage() == -1) { wattsUsed = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { wattsUsed = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return wattsUsed; }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction wattsUsed; if (getDefaultAssumedCpuUsage() == -1) { wattsUsed = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { wattsUsed = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return wattsUsed; } }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction wattsUsed; if (getDefaultAssumedCpuUsage() == -1) { wattsUsed = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { wattsUsed = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return wattsUsed; } CpuOnlySplinePolynomialEnergyPredictor();  CpuOnlySplinePolynomialEnergyPredictor(PropertiesConfiguration config); }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction wattsUsed; if (getDefaultAssumedCpuUsage() == -1) { wattsUsed = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { wattsUsed = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return wattsUsed; } CpuOnlySplinePolynomialEnergyPredictor();  CpuOnlySplinePolynomialEnergyPredictor(PropertiesConfiguration config); @Override EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration); @Override EnergyUsagePrediction getVMPredictedEnergy(VM vm, Collection<VM> virtualMachines, Host host, TimePeriod timePeriod); EnergyUsagePrediction predictTotalEnergy(Host host, double usageCPU, TimePeriod timePeriod); @Override double predictPowerUsed(Host host); @Override double predictPowerUsed(Host host, double usageCPU); @Override double getSumOfSquareError(Host host); @Override double getRootMeanSquareError(Host host); @Override String toString(); @Override void printFitInformation(Host host); }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction wattsUsed; if (getDefaultAssumedCpuUsage() == -1) { wattsUsed = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { wattsUsed = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return wattsUsed; } CpuOnlySplinePolynomialEnergyPredictor();  CpuOnlySplinePolynomialEnergyPredictor(PropertiesConfiguration config); @Override EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration); @Override EnergyUsagePrediction getVMPredictedEnergy(VM vm, Collection<VM> virtualMachines, Host host, TimePeriod timePeriod); EnergyUsagePrediction predictTotalEnergy(Host host, double usageCPU, TimePeriod timePeriod); @Override double predictPowerUsed(Host host); @Override double predictPowerUsed(Host host, double usageCPU); @Override double getSumOfSquareError(Host host); @Override double getRootMeanSquareError(Host host); @Override String toString(); @Override void printFitInformation(Host host);  }