Ignore:
Timestamp:
03/04/13 08:25:34 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/test/PhaseTimeEstimationPlugin.java

    r883 r896  
    88import schedframe.resources.units.ResourceUnitName; 
    99import schedframe.resources.units.StandardResourceUnitName; 
     10import schedframe.scheduling.tasks.phases.ResourceConsumption; 
    1011import dcworms.schedframe.scheduling.ExecTask; 
    1112import dcworms.schedframe.scheduling.Executable; 
     
    2728                        double completionPercentage) { 
    2829 
    29                  
    3030                Executable exec = (Executable) task; 
    31         //      System.out.println(exec.getJobId() +":"+ exec.getApplicationName()); 
     31                // System.out.println(exec.getJobId() +":"+ exec.getApplicationName()); 
    3232                // collect all information necessary to do the calculation 
    3333                PEUnit peUnit = (PEUnit) allocatedResources.get(StandardResourceUnitName.PE); 
     
    4040 
    4141                // estimate remainingTaskLength 
    42                 double remainingLength =  task.getLength() * (1 - completionPercentage/100); 
    43                  
     42                ResourceConsumption resConsumption = exec.getResourceConsumptionProfile().getCurrentResourceConsumption(); 
     43 
    4444                // do the calculation 
    45                 double execTime = (remainingLength / (cnt * speed)); 
     45                double execTime = (1 - completionPercentage/100) * resConsumption.getDuration(); 
    4646 
    4747                // 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.