How to get the remaining length of the cloudlet to be executed in VM

  • The remaining length to be executed, is find in CloudletScheduler class, in “updateVmProcessing()” method. From the Execution list, with the help of ResourceCloudlet can able to get the remaining length of the cloudlet.
  • public double updateVmProcessing(double currentTime, List mipsShare) {
    ………..;
    for (ResCloudlet rcl : getCloudletExecList()) {
    rcl.updateCloudletFinishedSoFar((long) (getCapacity(mipsShare) * timeSpam * rcl.getNumberOfPes() * Consts.MILLION));
    }
    if (getCloudletExecList().size() == 0) {
    setPreviousTime(currentTime);
    return 0.0;
    }
    ………..;
    for(int i=0;i<getCloudletExecList().size();i++){
    Log.printLine("Execution list: "+getCloudletExecList().size());
    long remainingLength = getCloudletExecList().get(i).getRemainingCloudletLength(); //retreive the remaining length;
    Log.printLine("Cloudlet:"+rcl.getCloudletId()+":Remaining Length is : "+remainingLength);
    }
    }
    }