Changeset 1396 for DCWoRMS/branches/coolemall/src/example/timeestimation
- Timestamp:
- 06/26/14 14:18:01 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src/example/timeestimation/coolemall
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/example/timeestimation/coolemall/CPUFreqScalingPhaseTimeEstimationPlugin.java
r1364 r1396 2 2 3 3 import java.util.Map; 4 5 import org.joda.time.DateTime;6 4 7 5 import schedframe.events.scheduling.SchedulingEvent; … … 14 12 import schedframe.resources.units.ResourceUnitName; 15 13 import schedframe.resources.units.StandardResourceUnitName; 16 import schedframe.scheduling.tasks.phases.ResourceConsumption;17 14 import dcworms.schedframe.scheduling.ExecTask; 18 import dcworms.schedframe.scheduling.Executable;19 15 import example.timeestimation.BaseTimeEstimationPlugin; 20 16 … … 26 22 double completionPercentage) { 27 23 28 String taskFreqString = task.get CurrentResourceConsumption().getReferenceHardware().get("cpu_maxfreq");24 String taskFreqString = task.getExecutionProfile().getCurrentResourceConsumption().getReferenceHardware().get("cpu_maxfreq"); 29 25 double taskFreq = Double.valueOf(taskFreqString); 30 26 … … 49 45 currentFrequency = taskFreq; 50 46 51 double execTime = (1 - completionPercentage/100) * task.get CurrentResourceConsumption().getDuration() * (taskFreq / currentFrequency);47 double execTime = (1 - completionPercentage/100) * task.getExecutionProfile().getCurrentResourceConsumption().getDuration() * (taskFreq / currentFrequency); 52 48 53 49 // if the result is very close to 0, but less then one millisecond then round this result to 0.001 -
DCWoRMS/branches/coolemall/src/example/timeestimation/coolemall/PhaseTimeEstimationPlugin.java
r1253 r1396 25 25 Executable exec = (Executable) task; 26 26 27 ResourceConsumption resConsumption = exec.get ResourceConsumptionProfile().getCurrentResourceConsumption();27 ResourceConsumption resConsumption = exec.getExecutionProfile().getCurrentResourceConsumption(); 28 28 29 29 double execTime = (1 - completionPercentage/100) * resConsumption.getDuration();
Note: See TracChangeset
for help on using the changeset viewer.