@Test public void TestGetHostPredictedEnergy() { System.out.println("getHostPredictedEnergy"); EnergyUsagePrediction prediction; addVMs(vm1); addVMs(vm2); CpuOnlyEnergyPredictor predictor = new CpuOnlyEnergyPredictor(); 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 energyUsage; if (getDefaultAssumedCpuUsage() == -1) { energyUsage = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { energyUsage = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return energyUsage; }
CpuOnlyEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction energyUsage; if (getDefaultAssumedCpuUsage() == -1) { energyUsage = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { energyUsage = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return energyUsage; } }
CpuOnlyEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction energyUsage; if (getDefaultAssumedCpuUsage() == -1) { energyUsage = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { energyUsage = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return energyUsage; } CpuOnlyEnergyPredictor();  CpuOnlyEnergyPredictor(PropertiesConfiguration config); }
CpuOnlyEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction energyUsage; if (getDefaultAssumedCpuUsage() == -1) { energyUsage = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { energyUsage = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return energyUsage; } CpuOnlyEnergyPredictor();  CpuOnlyEnergyPredictor(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 void printFitInformation(Host host); @Override String toString(); }
CpuOnlyEnergyPredictor extends AbstractEnergyPredictor { @Override public EnergyUsagePrediction getHostPredictedEnergy(Host host, Collection<VM> virtualMachines, TimePeriod duration) { EnergyUsagePrediction energyUsage; if (getDefaultAssumedCpuUsage() == -1) { energyUsage = predictTotalEnergy(host, getCpuUtilisation(host, virtualMachines), duration); } else { energyUsage = predictTotalEnergy(host, getDefaultAssumedCpuUsage(), duration); } return energyUsage; } CpuOnlyEnergyPredictor();  CpuOnlyEnergyPredictor(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 void printFitInformation(Host host); @Override String toString();  }