private static double cpuCost(MSApplicationNode node, IMSProvider prov) { Double costPerCPU = (Double) prov.getCharacteristic().get(Constant.COST_SEC); Integer cpu_number = (Integer) node.getComputing().getCharacteristic().get(Constant.CPU_NUMBER); Double cost = cpu_number * costPerCPU; return cost; }
private static double ramCost(MSApplicationNode node, IMSProvider prov) { Double costPerMem = (Double) prov.getCharacteristic().get(Constant.COST_MEM); Integer ram = (Integer) node.getComputing().getCharacteristic().get(Constant.RAM); Double cost = ram * costPerMem; return cost; }