- Timestamp:
- 02/26/13 08:41:50 (12 years ago)
- Location:
- DCWoRMS/branches/coolemall
- Files:
-
- 1 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/example/energy/CPUEnergyEstimationPlugin.java
r580 r883 17 17 powerConsumption = 0; 18 18 else { 19 try { 20 if(resource.getStatus() == ResourceStatus.BUSY) 19 if(resource.getStatus() == ResourceStatus.BUSY){ 20 try { 21 21 22 powerConsumption = cpu.getPowerInterface().getPowerConsumption(cpu.getPowerInterface().getPState()); 22 else { 23 powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON); 23 } catch (NoSuchFieldException e) { 24 try { 25 powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON); 26 } catch (NoSuchFieldException e1) { 27 powerConsumption = 10; 28 } 24 29 } 25 } catch (NoSuchFieldException e){30 } else{ 26 31 try { 27 powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON); 28 } catch (NoSuchFieldException e1) { 29 powerConsumption = 10; 32 powerConsumption = cpu.getPowerInterface().getPowerConsumption(cpu.getPowerInterface().getPState()); 33 } catch (NoSuchFieldException e) { 34 try { 35 powerConsumption = cpu.getPowerInterface().getPowerConsumption(StandardPowerStateName.ON); 36 } catch (NoSuchFieldException e1) { 37 powerConsumption = 0; 38 } 30 39 } 31 40 } 41 32 42 } 33 43 return powerConsumption;
Note: See TracChangeset
for help on using the changeset viewer.