@Test public void testPredictPowerUsedSweepTest() { System.out.println("predictPowerUsed"); setCalibrationData(host); host.setRamMb(32244); for (double usageCPU = 0.0; usageCPU <= 1.0; usageCPU = usageCPU + 0.05) { CpuOnlySplinePolynomialEnergyPredictor instance = new CpuOnlySplinePolynomialEnergyPredictor(); double result = instance.predictPowerUsed(host, usageCPU); System.out.println(usageCPU + " " +result); assert(result > 0.0); } }
@Override public double predictPowerUsed(Host host) { if (getDefaultAssumedCpuUsage() == -1) { return predictPowerUsed(host, getCpuUtilisation(host)); } else { return predictPowerUsed(host, getDefaultAssumedCpuUsage()); } }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public double predictPowerUsed(Host host) { if (getDefaultAssumedCpuUsage() == -1) { return predictPowerUsed(host, getCpuUtilisation(host)); } else { return predictPowerUsed(host, getDefaultAssumedCpuUsage()); } } }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public double predictPowerUsed(Host host) { if (getDefaultAssumedCpuUsage() == -1) { return predictPowerUsed(host, getCpuUtilisation(host)); } else { return predictPowerUsed(host, getDefaultAssumedCpuUsage()); } } CpuOnlySplinePolynomialEnergyPredictor();  CpuOnlySplinePolynomialEnergyPredictor(PropertiesConfiguration config); }
CpuOnlySplinePolynomialEnergyPredictor extends AbstractEnergyPredictor { @Override public double predictPowerUsed(Host host) { if (getDefaultAssumedCpuUsage() == -1) { return predictPowerUsed(host, getCpuUtilisation(host)); } else { return predictPowerUsed(host, getDefaultAssumedCpuUsage()); } } 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 double predictPowerUsed(Host host) { if (getDefaultAssumedCpuUsage() == -1) { return predictPowerUsed(host, getCpuUtilisation(host)); } else { return predictPowerUsed(host, getDefaultAssumedCpuUsage()); } } 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);  }