Changeset 150 for xssim/trunk/src
- Timestamp:
- 03/16/12 09:08:33 (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
xssim/trunk/src/example/energy/DataCenterEnergyEstimationPlugin.java
r104 r150 5 5 import schedframe.resources.profile.PowerUsage; 6 6 import test.rewolucja.energy.EnergyEvent; 7 import test.rewolucja.energy.plugin.EnergyEstimationPluginInterface;8 7 import test.rewolucja.resources.physical.base.ComputingResource; 9 import test.rewolucja.resources.physical.implementation.CPU;10 8 import test.rewolucja.resources.physical.implementation.ComputingNode; 11 import test.rewolucja.resources.physical.implementation.DataCenter;12 9 import test.rewolucja.scheduling.JobRegistryInterface; 13 import test.rewolucja.scheduling.PluginConfiguration;14 10 15 public class DataCenterEnergyEstimationPlugin implements EnergyEstimationPluginInterface{11 public class DataCenterEnergyEstimationPlugin extends BaseEnergyEstimationPlugin{ 16 12 17 13 @Override … … 24 20 power += (powerUsage == null ? 0 : powerUsage.getValue()); 25 21 } 26 //power += 100; 27 if(power < 140){ 28 for(ComputingResource child:resource.getChildren()){ 29 ComputingNode node = (ComputingNode)child; 30 for(CPU cpu:node.getProcessors()){ 31 //cpu.getPowerProfile().setFrequency(2000); 32 } 33 } 34 } 22 35 23 //System.out.println( new DateTime() + "ENERGY CONSUMPT BY: " + resMan.getResourceName() +" IS: " + power); 36 24 return power; 37 25 } 38 26 39 @Override40 27 public String getName() { 41 // TODO Auto-generated method stub 42 return null; 28 return getClass().getName(); 43 29 } 44 30 45 @Override46 31 public void init(Properties properties) { 47 32 // TODO Auto-generated method stub … … 49 34 } 50 35 51 @Override52 public PluginConfiguration getConfiguration() {53 // TODO Auto-generated method stub54 return null;55 }56 57 @Override58 public double estimateEnergyDissipation(EnergyEvent event, JobRegistryInterface jobRegistry, ComputingResource resourceManager) {59 // TODO Auto-generated method stub60 return 0;61 }62 63 @Override64 public double estimateTemperature(EnergyEvent event, JobRegistryInterface jobRegistry, ComputingResource resourceManager) {65 // TODO Auto-generated method stub66 return 0;67 }68 69 36 }
Note: See TracChangeset
for help on using the changeset viewer.