Ignore:
Timestamp:
12/20/12 17:23:35 (12 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/src/test/article/recs/plugins/scheduling
Files:
3 added
2 deleted
4 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/test/article/recs/plugins/scheduling/RecsExclusivenessDFSSP.java

    r679 r708  
    33import gridsim.dcworms.DCWormsTags; 
    44 
     5import java.io.FileNotFoundException; 
     6import java.io.IOException; 
    57import java.util.ArrayList; 
    68import java.util.HashMap; 
    79import java.util.List; 
    810import java.util.Map; 
     11import java.util.MissingResourceException; 
    912import java.util.Random; 
    1013 
     
    132135                                if(freeCores != cores.size()) 
    133136                                        continue; 
     137                                try { 
     138                                        if(!getExecutiveness(createExecutivenessQuery(task, node))) 
     139                                                continue; 
     140                                } catch (FileNotFoundException e) { 
     141                                        continue; 
     142                                } catch (IOException e) { 
     143                                        continue; 
     144                                } catch (MissingResourceException e){ 
     145                                        continue; 
     146                                } 
    134147                                 
    135148                                filteredNodes.add(node); 
     
    158171                                rppi.setPState(rppi.getHighestPState().getName()); 
    159172                        else 
    160                                 rppi.setPState(rppi.getLowestPState().getName()); 
     173                                rppi.setPState(rppi.getHighestPState().getName()); 
    161174 
    162175                } 
  • DCWoRMS/trunk/src/test/article/recs/plugins/scheduling/RecsExclusivenessEnOptSP.java

    r680 r708  
    2222import schedframe.resources.computing.Core; 
    2323import schedframe.resources.computing.Processor; 
     24import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; 
    2425import schedframe.resources.units.ProcessingElements; 
    2526import schedframe.resources.units.ResourceUnit; 
     
    8485                List<ComputingNode> nodes = resourceManager.getComputingNodes(); 
    8586                Collections.sort(nodes, new EnergyComparator(task)); 
     87                //System.out.println("*****"); 
    8688                for (ComputingNode node : nodes) { 
     89                        //System.out.println(node.getCategory()); 
    8790                        int cpuRequest; 
    8891                        try { 
     
    111114                                if(freeCores != cores.size()) 
    112115                                        continue; 
     116                                 
     117                                try { 
     118                                        if(!getExecutiveness(createExecutivenessQuery(task, node))) 
     119                                                continue; 
     120                                } catch (FileNotFoundException e) { 
     121                                        continue; 
     122                                } catch (IOException e) { 
     123                                        continue; 
     124                                } catch (MissingResourceException e){ 
     125                                        continue; 
     126                                } 
     127                                 
    113128                                List<ComputingResource> choosenResources = new ArrayList<ComputingResource>();                           
    114129                                for (int i = 0; i < cores.size() && cpuRequest > 0; i++) { 
     
    201216                double node2EU = Double.MAX_VALUE; 
    202217                try { 
    203                                 node1EU = getMeasuredTime(createQuery(task, node1)) * getMeasuredPower(createQuery(task, node1)); 
    204                                 node2EU = getMeasuredTime(createQuery(task, node2)) * getMeasuredPower(createQuery(task, node2)); 
    205                         } catch (FileNotFoundException e) { 
     218                                node1EU = getMeasuredTime(createQuery(task, node1)) * (getMeasuredPower(createQuery(task, node1)) - node1.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON)); 
     219                                //System.out.println(node1.getCategory() + ": " + node1EU + "; "+ getMeasuredTime(createQuery(task, node1)) +";" + node1.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON) + ":" + getMeasuredPower(createQuery(task, node1))); 
     220                                node2EU = getMeasuredTime(createQuery(task, node2)) * (getMeasuredPower(createQuery(task, node2)) - node2.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON)); 
     221                                //System.out.println(node2.getCategory() + ": " + node2EU + "; "+ getMeasuredTime(createQuery(task, node2)) +";" + node2.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON) + ":" + getMeasuredPower(createQuery(task, node2))); 
     222                } catch (FileNotFoundException e) { 
    206223 
    207224                        } catch (IOException e) { 
     
    209226                        } catch (MissingResourceException e){ 
    210227                                 
     228                        } catch (NoSuchFieldException e) { 
     229 
    211230                        } 
    212231                if(node1EU > node2EU) 
  • DCWoRMS/trunk/src/test/article/recs/plugins/scheduling/RecsExclusivenessRandomSP.java

    r679 r708  
    33import gridsim.dcworms.DCWormsTags; 
    44 
     5import java.io.FileNotFoundException; 
     6import java.io.IOException; 
    57import java.util.ArrayList; 
    68import java.util.HashMap; 
    79import java.util.List; 
    810import java.util.Map; 
     11import java.util.MissingResourceException; 
    912import java.util.Random; 
    1013 
     
    131134                                        continue; 
    132135                                 
     136                                try { 
     137                                        if(!getExecutiveness(createExecutivenessQuery(task, node))) 
     138                                                continue; 
     139                                } catch (FileNotFoundException e) { 
     140                                        continue; 
     141                                } catch (IOException e) { 
     142                                        continue; 
     143                                } catch (MissingResourceException e){ 
     144                                        continue; 
     145                                } 
    133146                                filteredNodes.add(node); 
    134147                        } 
  • DCWoRMS/trunk/src/test/article/recs/plugins/scheduling/RecsSP.java

    r705 r708  
    2727        } 
    2828         
    29         protected String createQuery(TaskInterface<?> task, ComputingNode node) { 
     29        protected String createExecutivenessQuery(TaskInterface<?> task, ComputingNode node) { 
    3030                Executable exec = (Executable)task; 
    3131                String query = getApplicationType(exec) + "." + getNodeCategory(node); 
Note: See TracChangeset for help on using the changeset viewer.