Changeset 763 for DCWoRMS/trunk/src
- Timestamp:
- 01/09/13 12:41:08 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
r678 r763 404 404 405 405 Map<ResourceUnitName, ResourceUnit> choosenResources = exec.getUsedResources().getLast().getResourceUnits(); 406 int time = 406 int time = Double.valueOf(execTimeEstimationPlugin.execTimeEstimation(new SchedulingEvent(SchedulingEventType.RESOURCE_STATE_CHANGED), 407 407 execTask, choosenResources, exec.getCompletionPercentage())).intValue(); 408 408 409 409 //check if the new estimated end time is equal to the previous one; if yes the continue without update 410 if( 410 if(DoubleMath.subtract((exec.getExecStartTime() + exec.getEstimatedDuration()), (new DateTime().getMillis()/1000 + time)) == 0.0){ 411 411 continue; 412 412 } … … 483 483 List<ResourceUnit> choosenPEUnits = new ArrayList<ResourceUnit>(); 484 484 for (int i = 0; i < availableUnits.size() && cpuRequest > 0; i++) { 485 PEUnit peUnit = (PEUnit) availableUnits 485 PEUnit peUnit = (PEUnit) availableUnits.get(i); 486 486 if(peUnit.getFreeAmount() > 0){ 487 int 487 int allocPE = Math.min(peUnit.getFreeAmount(), cpuRequest); 488 488 cpuRequest = cpuRequest - allocPE; 489 489 choosenPEUnits.add(peUnit.replicate(allocPE));
Note: See TracChangeset
for help on using the changeset viewer.