Ignore:
Timestamp:
01/02/13 08:12:13 (12 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/test/article/recs/plugins/timeestimation/RecsTimeEstimationPlugin.java

    r664 r734  
    1010 
    1111import schedframe.events.scheduling.SchedulingEvent; 
     12import schedframe.resources.computing.ComputingNode; 
    1213import schedframe.resources.computing.Core; 
    1314import schedframe.resources.computing.Processor; 
     
    4243                try { 
    4344                        execTime = TIME_FACTOR * (1 - completionPercentage/100) * getMeasuredTime(query); 
     45                        //System.out.println(task.getJobId()+": "+ execTime + "; "+ completionPercentage); 
    4446                        if (Double.compare(execTime, 0.001) < 0) { 
    4547                                execTime = 0.001; 
    4648                        } 
    4749                        execTime = Math.round(execTime); 
     50                        //System.out.println(task.getJobId()+": "+ execTime); 
    4851                } catch (FileNotFoundException e) { 
    4952                        execTime = defaultEstimation(task, peUnit, completionPercentage); 
     
    7174                 
    7275                ProcessingElements pe = (ProcessingElements) peUnit; 
     76                if(pe.get(0) instanceof ComputingNode) 
     77                        return ((ComputingNode)pe.get(0)).getCategory(); 
    7378                Core core = (Core)pe.get(0); 
    7479                return core.getParent().getParent().getCategory(); 
     
    7782        private int getFrequency(PEUnit peUnit){ 
    7883                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(); 
    7986                Core core = (Core)pe.get(0); 
    8087                Processor proc = (Processor) core.getParent(); 
Note: See TracChangeset for help on using the changeset viewer.