Changeset 546
- Timestamp:
- 11/05/12 16:05:28 (12 years ago)
- Location:
- DCWoRMS/trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/trunk/src/example/energy/DefaultEnergyEstimationPlugin.java
r542 r546 16 16 powerConsumption = 0; 17 17 } 18 19 powerConsumption = powerConsumption + getChildrenPowerConsumption(resource); 20 18 21 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 } 20 39 } 21 40 return powerConsumption; -
DCWoRMS/trunk/src/schedframe/resources/computing/profiles/energy/power/PowerProfile.java
r512 r546 16 16 protected EnergyEstimationPlugin energyEstimationPlugin; 17 17 18 protected List< schedframe.resources.computing.profiles.energy.power.PowerState> supportedPowerStates;18 protected List<PowerState> supportedPowerStates; 19 19 protected Map<String, PState> supportedPStates; 20 20 … … 60 60 } 61 61 62 public List< schedframe.resources.computing.profiles.energy.power.PowerState> getSupportedPowerStates() throws NoSuchFieldException{62 public List<PowerState> getSupportedPowerStates() throws NoSuchFieldException{ 63 63 if(supportedPowerStates == null) 64 64 throw new NoSuchFieldException("Supported power states are not defined.");
Note: See TracChangeset
for help on using the changeset viewer.