/** * Gets the total monetary cost of processing power allocated from the PM hosting the VM. * * @return */ public double getProcessingCost() { final double hostMips = vm.getHost().getPeList().stream() .findFirst() .map(Pe::getCapacity) .orElse(0L); final double costPerMI = hostMips > 0 ? getDcCharacteristics().getCostPerSecond()/hostMips : 0.0; return costPerMI * getVm().getMips() * getVm().getNumberOfPes(); }