Changeset 734 for DCWoRMS/trunk/src/test/article/recs/plugins/timeestimation/RecsTimeEstimationPlugin.java
- Timestamp:
- 01/02/13 08:12:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/test/article/recs/plugins/timeestimation/RecsTimeEstimationPlugin.java
r664 r734 10 10 11 11 import schedframe.events.scheduling.SchedulingEvent; 12 import schedframe.resources.computing.ComputingNode; 12 13 import schedframe.resources.computing.Core; 13 14 import schedframe.resources.computing.Processor; … … 42 43 try { 43 44 execTime = TIME_FACTOR * (1 - completionPercentage/100) * getMeasuredTime(query); 45 //System.out.println(task.getJobId()+": "+ execTime + "; "+ completionPercentage); 44 46 if (Double.compare(execTime, 0.001) < 0) { 45 47 execTime = 0.001; 46 48 } 47 49 execTime = Math.round(execTime); 50 //System.out.println(task.getJobId()+": "+ execTime); 48 51 } catch (FileNotFoundException e) { 49 52 execTime = defaultEstimation(task, peUnit, completionPercentage); … … 71 74 72 75 ProcessingElements pe = (ProcessingElements) peUnit; 76 if(pe.get(0) instanceof ComputingNode) 77 return ((ComputingNode)pe.get(0)).getCategory(); 73 78 Core core = (Core)pe.get(0); 74 79 return core.getParent().getParent().getCategory(); … … 77 82 private int getFrequency(PEUnit peUnit){ 78 83 ProcessingElements pe = (ProcessingElements) peUnit; 84 if(pe.get(0) instanceof ComputingNode) 85 return Double.valueOf(((ComputingNode)pe.get(0)).getProcessors().get(0).getPowerInterface().getFrequency()).intValue(); 79 86 Core core = (Core)pe.get(0); 80 87 Processor proc = (Processor) core.getParent();
Note: See TracChangeset
for help on using the changeset viewer.