Commit 5dd1dea0 authored by sarehfotuhi's avatar sarehfotuhi

commit-10.50

parent b44b61cf
......@@ -35,9 +35,9 @@ public class ConstantsExamples {
*/
public static final int VM_TYPES = 4;
public static final int[] VM_MIPS = new int[]{37274 / 2, 37274 / 2, 37274 / 2, 37274 / 2};
public static final double[] VM_MIPS = new double[]{37274/ 2, 37274 / 2, 37274 / 2, 37274 / 2};
public static final int[] VM_PES = new int[]{2, 4, 1, 8};
public static final int[] VM_RAM = new int[]{1024, 2048, 4096, 8192};//**MB*
public static final float[] VM_RAM = new float[] {(float)1024, (float) 2048, (float) 4096, (float) 8192};//**MB*
public static final int VM_BW = 100000;
public static final int VM_SIZE = 2500;
......
......@@ -220,11 +220,17 @@ public abstract class RunnerAbs {
if (vmAllocationPolicyName.startsWith("MSThreshold-Over_")) {
double overUtilizationThreshold = Double.parseDouble(vmAllocationPolicyName.substring(18));
vmAllocationPolicy = new PowerContainerVmAllocationPolicyMigrationStaticThresholdMC(hostList, vmSelectionPolicy, containerSelectionPolicy, hostSelectionPolicy, overUtilizationThreshold);
vmAllocationPolicy = new PowerContainerVmAllocationPolicyMigrationStaticThresholdMC(hostList, vmSelectionPolicy,
containerSelectionPolicy, hostSelectionPolicy, overUtilizationThreshold,
ConstantsExamples.VM_TYPES,ConstantsExamples.VM_PES, ConstantsExamples.VM_RAM, ConstantsExamples.VM_BW,
ConstantsExamples.VM_SIZE, ConstantsExamples.VM_MIPS);
} else if (vmAllocationPolicyName.startsWith("MSThreshold-Under_")) {
double overUtilizationThreshold = Double.parseDouble(vmAllocationPolicyName.substring(18, 22));
double underUtilizationThreshold = Double.parseDouble(vmAllocationPolicyName.substring(24));
vmAllocationPolicy = new PowerContainerVmAllocationPolicyMigrationStaticThresholdMCUnderUtilized(hostList, vmSelectionPolicy, containerSelectionPolicy, hostSelectionPolicy, overUtilizationThreshold, underUtilizationThreshold);
vmAllocationPolicy = new PowerContainerVmAllocationPolicyMigrationStaticThresholdMCUnderUtilized(hostList,
vmSelectionPolicy, containerSelectionPolicy, hostSelectionPolicy, overUtilizationThreshold,
underUtilizationThreshold,ConstantsExamples.VM_TYPES,ConstantsExamples.VM_PES, ConstantsExamples.VM_RAM, ConstantsExamples.VM_BW,
ConstantsExamples.VM_SIZE, ConstantsExamples.VM_MIPS );
} else if (vmAllocationPolicyName.startsWith("VMThreshold-Under_")) {
......@@ -282,10 +288,7 @@ public abstract class RunnerAbs {
protected HostSelectionPolicy getHostSelectionPolicy(String hostSelectionPolicyName) {
Object hostSelectionPolicy = null;
if (hostSelectionPolicyName.startsWith("CorThreshold")) {
double threshold = Double.parseDouble(hostSelectionPolicyName.substring(13));
hostSelectionPolicy = new HostSelectionPolicyCorrelationThreshold(new HostSelectionPolicyRandomSelection(), threshold);
} else if (hostSelectionPolicyName == "FirstFit") {
if (hostSelectionPolicyName == "FirstFit") {
hostSelectionPolicy = new HostSelectionPolicyFirstFit();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment