@Test public void calculateStDevDiskLoad() { Collection<ServerLoad> serversLoads = new ArrayList<>(); serversLoads.add(new ServerLoad(0.2, 0.2, 0.2)); serversLoads.add(new ServerLoad(0.6, 0.6, 0.6)); assertEquals(0.2, Scheduler.calculateStDevDiskLoad(serversLoads), 0.01); }
public static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad) { double sumOfDifferences = 0; double avgDiskLoad = calculateAvgDiskLoad(serversLoad); for (ServerLoad serverLoad: serversLoad) { sumOfDifferences += Math.pow((serverLoad.getDiskLoad() - avgDiskLoad), 2); } return Math.sqrt(sumOfDifferences/serversLoad.size()); }
Scheduler { public static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad) { double sumOfDifferences = 0; double avgDiskLoad = calculateAvgDiskLoad(serversLoad); for (ServerLoad serverLoad: serversLoad) { sumOfDifferences += Math.pow((serverLoad.getDiskLoad() - avgDiskLoad), 2); } return Math.sqrt(sumOfDifferences/serversLoad.size()); } }
Scheduler { public static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad) { double sumOfDifferences = 0; double avgDiskLoad = calculateAvgDiskLoad(serversLoad); for (ServerLoad serverLoad: serversLoad) { sumOfDifferences += Math.pow((serverLoad.getDiskLoad() - avgDiskLoad), 2); } return Math.sqrt(sumOfDifferences/serversLoad.size()); } Scheduler(SchedAlgorithmNameEnum schedAlg, List<VmDeployed> vmsDeployed,
                     EnergyModeller energyModeller, PricingModeller pricingModeller); }
Scheduler { public static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad) { double sumOfDifferences = 0; double avgDiskLoad = calculateAvgDiskLoad(serversLoad); for (ServerLoad serverLoad: serversLoad) { sumOfDifferences += Math.pow((serverLoad.getDiskLoad() - avgDiskLoad), 2); } return Math.sqrt(sumOfDifferences/serversLoad.size()); } Scheduler(SchedAlgorithmNameEnum schedAlg, List<VmDeployed> vmsDeployed,
                     EnergyModeller energyModeller, PricingModeller pricingModeller); synchronized void setSchedAlgorithm(SchedAlgorithmNameEnum schedAlg); static double calculateStDevCpuLoad(Collection<ServerLoad> serversLoad); static double calculateStDevMemLoad(Collection<ServerLoad> serversLoad); static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad); static double getTotalUnusedCpuPerc(Collection<ServerLoad> serverLoads); static double getTotalUnusedMemPerc(Collection<ServerLoad> serverLoads); static double getTotalUnusedDiskPerc(Collection<ServerLoad> serverLoads); static Map<String, ServerLoad> getServersLoadsAfterDeploymentPlanExecuted(DeploymentPlan deploymentPlan,
            List<Host> hosts); DeploymentPlan chooseBestDeploymentPlan(List<Vm> vms, List<Host> hosts); }
Scheduler { public static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad) { double sumOfDifferences = 0; double avgDiskLoad = calculateAvgDiskLoad(serversLoad); for (ServerLoad serverLoad: serversLoad) { sumOfDifferences += Math.pow((serverLoad.getDiskLoad() - avgDiskLoad), 2); } return Math.sqrt(sumOfDifferences/serversLoad.size()); } Scheduler(SchedAlgorithmNameEnum schedAlg, List<VmDeployed> vmsDeployed,
                     EnergyModeller energyModeller, PricingModeller pricingModeller); synchronized void setSchedAlgorithm(SchedAlgorithmNameEnum schedAlg); static double calculateStDevCpuLoad(Collection<ServerLoad> serversLoad); static double calculateStDevMemLoad(Collection<ServerLoad> serversLoad); static double calculateStDevDiskLoad(Collection<ServerLoad> serversLoad); static double getTotalUnusedCpuPerc(Collection<ServerLoad> serverLoads); static double getTotalUnusedMemPerc(Collection<ServerLoad> serverLoads); static double getTotalUnusedDiskPerc(Collection<ServerLoad> serverLoads); static Map<String, ServerLoad> getServersLoadsAfterDeploymentPlanExecuted(DeploymentPlan deploymentPlan,
            List<Host> hosts); DeploymentPlan chooseBestDeploymentPlan(List<Vm> vms, List<Host> hosts);  }