- Timestamp:
- 03/04/13 08:25:34 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/test/PhaseTimeEstimationPlugin.java
r883 r896 8 8 import schedframe.resources.units.ResourceUnitName; 9 9 import schedframe.resources.units.StandardResourceUnitName; 10 import schedframe.scheduling.tasks.phases.ResourceConsumption; 10 11 import dcworms.schedframe.scheduling.ExecTask; 11 12 import dcworms.schedframe.scheduling.Executable; … … 27 28 double completionPercentage) { 28 29 29 30 30 Executable exec = (Executable) task; 31 //System.out.println(exec.getJobId() +":"+ exec.getApplicationName());31 // System.out.println(exec.getJobId() +":"+ exec.getApplicationName()); 32 32 // collect all information necessary to do the calculation 33 33 PEUnit peUnit = (PEUnit) allocatedResources.get(StandardResourceUnitName.PE); … … 40 40 41 41 // estimate remainingTaskLength 42 double remainingLength = task.getLength() * (1 - completionPercentage/100);43 42 ResourceConsumption resConsumption = exec.getResourceConsumptionProfile().getCurrentResourceConsumption(); 43 44 44 // do the calculation 45 double execTime = ( remainingLength / (cnt * speed));45 double execTime = (1 - completionPercentage/100) * resConsumption.getDuration(); 46 46 47 47 // if the result is very close to 0, but less then one millisecond then round this result to 0.001
Note: See TracChangeset
for help on using the changeset viewer.