Changeset 546 for DCWoRMS


Ignore:
Timestamp:
11/05/12 16:05:28 (12 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/trunk/src/example/energy/DefaultEnergyEstimationPlugin.java

    r542 r546  
    1616                        powerConsumption = 0; 
    1717                } 
     18                 
     19                powerConsumption = powerConsumption + getChildrenPowerConsumption(resource); 
     20                 
    1821                for(ComputingResource child:resource.getChildren()){ 
    19                         powerConsumption = powerConsumption + child.getPowerInterface().getRecentPowerUsage().getValue();  
     22                        try { 
     23                                //powerConsumption = powerConsumption + child.getPowerInterface().getRecentPowerUsage().getValue();  
     24                        } catch (Exception e) { 
     25 
     26                        } 
     27                } 
     28                return powerConsumption; 
     29        } 
     30         
     31        private double getChildrenPowerConsumption(ComputingResource resource){ 
     32                double powerConsumption = 0; 
     33                for(ComputingResource child:resource.getChildren()){ 
     34                        try { 
     35                                powerConsumption = powerConsumption + child.getPowerInterface().getRecentPowerUsage().getValue();  
     36                        } catch (Exception e) { 
     37                                powerConsumption = powerConsumption + getChildrenPowerConsumption(child); 
     38                        } 
    2039                } 
    2140                return powerConsumption; 
  • DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/PowerProfile.java

    r512 r546  
    1616        protected EnergyEstimationPlugin energyEstimationPlugin; 
    1717 
    18         protected List<schedframe.resources.computing.profiles.energy.power.PowerState> supportedPowerStates; 
     18        protected List<PowerState> supportedPowerStates; 
    1919        protected Map<String, PState> supportedPStates; 
    2020         
     
    6060        } 
    6161         
    62         public List<schedframe.resources.computing.profiles.energy.power.PowerState> getSupportedPowerStates() throws NoSuchFieldException{ 
     62        public List<PowerState> getSupportedPowerStates() throws NoSuchFieldException{ 
    6363                if(supportedPowerStates == null) 
    6464                        throw new NoSuchFieldException("Supported power states are not defined."); 
Note: See TracChangeset for help on using the changeset viewer.