Changeset 1396 for DCWoRMS/branches
- Timestamp:
- 06/26/14 14:18:01 (11 years ago)
- Location:
- DCWoRMS/branches/coolemall/src
- Files:
-
- 2 added
- 3 deleted
- 87 edited
- 22 moved
Legend:
- Unmodified
- Added
- Removed
-
DCWoRMS/branches/coolemall/src/dcworms/schedframe/scheduling/ExecTask.java
r1362 r1396 4 4 5 5 import schedframe.scheduling.ExecutionHistoryItem; 6 import schedframe.scheduling.Resource HistoryItem;6 import schedframe.scheduling.ResourceItem; 7 7 import schedframe.scheduling.tasks.TaskInterface; 8 import schedframe.scheduling.tasks.phases.ResourceConsumption;9 8 import schedframe.scheduling.tasks.phases.ExecutionProfile; 10 9 import schedframe.scheduling.tasks.requirements.ResourceParameterName; … … 15 14 public Object getExpectedSpecificResource(ResourceParameterName resourceName); 16 15 17 public LinkedList<ExecutionHistoryItem> getExecHistory(); 18 public LinkedList<ResourceHistoryItem> getAllocatedResources(); 16 public ExecutionProfile getExecutionProfile(); 19 17 20 public ExecutionProfile getResourceConsumptionProfile();21 public ResourceConsumption getCurrentResourceConsumption();18 public LinkedList<ResourceItem> getAllocatedResources(); 19 public String getSchedulerName(); 22 20 23 public String getSchedulerName(); 21 public LinkedList<ExecutionHistoryItem> getExecutionHistory(); 22 24 23 } -
DCWoRMS/branches/coolemall/src/dcworms/schedframe/scheduling/Executable.java
r1362 r1396 24 24 import schedframe.resources.units.StandardResourceUnitName; 25 25 import schedframe.scheduling.ExecutionHistoryItem; 26 import schedframe.scheduling.Resource HistoryItem;26 import schedframe.scheduling.ResourceItem; 27 27 import schedframe.scheduling.WorkloadUnitHandler; 28 28 import schedframe.scheduling.manager.tasks.JobRegistryImpl; … … 65 65 66 66 protected LinkedList<ExecutionHistoryItem> execHistory;; 67 protected LinkedList<Resource HistoryItem> allocatedResources;67 protected LinkedList<ResourceItem> allocatedResources; 68 68 69 69 public Executable(Task t){ … … 71 71 this.status = DCWormsTags.CREATED; 72 72 73 this.allocatedResources = new LinkedList<Resource HistoryItem>();73 this.allocatedResources = new LinkedList<ResourceItem>(); 74 74 this.execHistory = new LinkedList<ExecutionHistoryItem>(); 75 75 init(); … … 81 81 this.processesSetId = procesesSet.getId(); 82 82 83 this.allocatedResources = new LinkedList<Resource HistoryItem>();83 this.allocatedResources = new LinkedList<ResourceItem>(); 84 84 this.execHistory = new LinkedList<ExecutionHistoryItem>(); 85 85 init(); … … 366 366 }*/ 367 367 368 public ExecutionProfile get ResourceConsumptionProfile(){368 public ExecutionProfile getExecutionProfile(){ 369 369 return execProfile; 370 370 } … … 470 470 } 471 471 472 public LinkedList<ExecutionHistoryItem> getExec History() {472 public LinkedList<ExecutionHistoryItem> getExecutionHistory() { 473 473 return execHistory; 474 474 } … … 478 478 } 479 479 480 public LinkedList<Resource HistoryItem> getAllocatedResources() {480 public LinkedList<ResourceItem> getAllocatedResources() { 481 481 return allocatedResources; 482 482 } 483 483 484 public void addAllocatedResources(Resource HistoryItem allocatedResourcesItem) {484 public void addAllocatedResources(ResourceItem allocatedResourcesItem) { 485 485 this.allocatedResources.add(allocatedResourcesItem); 486 486 } -
DCWoRMS/branches/coolemall/src/example/energy/BaseEnergyEstimationPlugin.java
r1207 r1396 17 17 18 18 @Override 19 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {19 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 20 20 throw new RuntimeException("Not implemented."); 21 21 } -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/CB1EnergyEstimationPlugin.java
r1329 r1396 11 11 import schedframe.resources.computing.coolemall.NodeGroup; 12 12 import schedframe.resources.computing.profiles.energy.EnergyEvent; 13 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;13 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 14 14 import schedframe.resources.computing.profiles.energy.power.PState; 15 15 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 105 105 for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 106 106 try { 107 fpc = fpc + device.getAir ThroughputInterface().getPowerConsumption(new UserAirThroughputStateName("2"));107 fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("2")); 108 108 } catch (NoSuchFieldException e) { 109 109 // TODO Auto-generated catch block -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/CB2EnergyEstimationPlugin.java
r1299 r1396 168 168 169 169 delta_p = ConfigurationOptions.coolingData.getPressureDrop(); 170 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();170 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 171 171 172 172 if(delta_p != -1 && Vair_total != -1) … … 192 192 double Vair_recs1 = 0; 193 193 194 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();194 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 195 195 196 196 double Vair_recs2 = 0; … … 198 198 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 199 199 200 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();200 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 201 201 202 202 break; … … 401 401 if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){ 402 402 try { 403 Qfans = Qfans + (1 - delta_2) * fan.getAir ThroughputInterface().getPowerConsumption(fan.getAirThroughputInterface().getAirThroughputState());403 Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState()); 404 404 } catch (NoSuchFieldException e) { 405 405 // TODO Auto-generated catch block … … 443 443 double ro = 1.168;//constant 444 444 445 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();445 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 446 446 447 447 if(Vair_total != -1) { … … 465 465 double Vair_recs1 = 0; 466 466 467 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();467 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 468 468 469 469 double Vair_recs2 = 0; … … 471 471 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 472 472 473 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();473 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 474 474 475 475 break; -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/CoolingDeviceEnergyEstimationPlugin.java
r1299 r1396 18 18 public class CoolingDeviceEnergyEstimationPlugin extends BaseEnergyEstimationPlugin { 19 19 20 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {21 double air Throughput= 0;22 return air Throughput;20 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 21 double airflow = 0; 22 return airflow; 23 23 } 24 24 … … 140 140 141 141 delta_p = ConfigurationOptions.coolingData.getPressureDrop(); 142 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();142 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 143 143 144 144 if(delta_p != -1 && Vair_total != -1) … … 164 164 double Vair_recs1 = 0; 165 165 166 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();166 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 167 167 168 168 double Vair_recs2 = 0; … … 170 170 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 171 171 172 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();172 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 173 173 174 174 break; … … 373 373 if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){ 374 374 try { 375 Qfans = Qfans + (1 - delta_2) * fan.getAir ThroughputInterface().getPowerConsumption(fan.getAirThroughputInterface().getAirThroughputState());375 Qfans = Qfans + (1 - delta_2) * fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState()); 376 376 } catch (NoSuchFieldException e) { 377 377 // TODO Auto-generated catch block … … 415 415 double ro = 1.168;//constant 416 416 417 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();417 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 418 418 419 419 if(Vair_total != -1) { … … 437 437 double Vair_recs1 = 0; 438 438 439 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();439 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 440 440 441 441 double Vair_recs2 = 0; … … 443 443 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 444 444 445 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();445 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 446 446 447 447 break; -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/FanEnergyEstimationPlugin.java
r1299 r1396 21 21 Fan fan = (Fan) resource; 22 22 try { 23 powerConsumption = fan.getAir ThroughputInterface().getPowerConsumption(fan.getAirThroughputInterface().getAirThroughputState());23 powerConsumption = fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState()); 24 24 } catch (NoSuchFieldException e) { 25 25 // TODO Auto-generated catch block … … 35 35 } 36 36 37 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {37 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 38 38 39 double air Throughput= 0;39 double airflow = 0; 40 40 Fan fan = (Fan) resource; 41 41 try { 42 42 if(event.getReason() == EventReason.SIM_INIT) 43 air Throughput = fan.getAirThroughputInterface().getAirFlow(fan.getAirThroughputInterface().getAirThroughputState());43 airflow = fan.getAirflowInterface().getAirflow(fan.getAirflowInterface().getAirflowState()); 44 44 else 45 air Throughput = fan.getAirThroughputInterface().getAirFlow(fan.getAirThroughputInterface().getAirThroughputState());45 airflow = fan.getAirflowInterface().getAirflow(fan.getAirflowInterface().getAirflowState()); 46 46 } catch (NoSuchFieldException e) { 47 47 // TODO Auto-generated catch block … … 65 65 66 66 67 return air Throughput* getNumberOfWorkingNodes(fan)/(double)fan.getChilledResources().size();67 return airflow * getNumberOfWorkingNodes(fan)/(double)fan.getChilledResources().size(); 68 68 } 69 69 -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/FlowPumpInletEnergyEstimationPlugin.java
r1299 r1396 26 26 27 27 delta_p = ConfigurationOptions.coolingData.getPressureDrop(); 28 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();28 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 29 29 30 30 if(delta_p != -1 && Vair_total != -1) … … 53 53 double Vair_recs1 = 0; 54 54 55 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();55 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 56 56 57 57 double Vair_recs2 = 0; … … 59 59 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 60 60 61 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();61 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 62 62 63 63 break; … … 86 86 } 87 87 88 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {89 double air Throughput= 0;88 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 89 double airflow = 0; 90 90 double Vair_total; 91 91 92 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();92 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 93 93 if(Vair_total != -1) { 94 air Throughput= Vair_total;94 airflow = Vair_total; 95 95 } else { 96 96 Device flowPump = (Device) resource; … … 114 114 double Vair_recs1 = 0; 115 115 116 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();116 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 117 117 118 118 double Vair_recs2 = 0; … … 120 120 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 121 121 122 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();122 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 123 123 124 124 break; … … 136 136 mair_total = mair_rack; 137 137 Vair_total = mair_total / ro; 138 air Throughput= Vair_total;138 airflow = Vair_total; 139 139 } 140 return air Throughput;140 return airflow; 141 141 } 142 142 -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/FlowPumpOutletEnergyEstimationPlugin.java
r1299 r1396 23 23 } 24 24 25 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {26 double air Throughput= 0;25 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 26 double airflow = 0; 27 27 double Vair_total; 28 28 29 Vair_total = ConfigurationOptions.coolingData.getAir FlowVolume();29 Vair_total = ConfigurationOptions.coolingData.getAirflowVolume(); 30 30 if(Vair_total != -1) { 31 air Throughput= Vair_total;31 airflow = Vair_total; 32 32 } else { 33 33 Device flowPump = (Device) resource; … … 51 51 double Vair_recs1 = 0; 52 52 53 Vair_recs1 = fan.getAir ThroughputInterface().getRecentAirFlow().getValue();53 Vair_recs1 = fan.getAirflowInterface().getRecentAirflow().getValue(); 54 54 55 55 double Vair_recs2 = 0; … … 57 57 if(device2.getType().equals(StandardResourceType.Inlet) && device2.getFullName().equals(fan.getFullName().replace("Outlet", "Inlet"))){ 58 58 59 Vair_recs2 = device2.getAir ThroughputInterface().getRecentAirFlow().getValue();59 Vair_recs2 = device2.getAirflowInterface().getRecentAirflow().getValue(); 60 60 61 61 break; … … 73 73 mair_total = mair_rack; 74 74 Vair_total = mair_total / ro; 75 air Throughput= Vair_total;75 airflow = Vair_total; 76 76 } 77 return air Throughput;77 return airflow; 78 78 } 79 79 } -
DCWoRMS/branches/coolemall/src/example/energy/coolemall/NodeEnergyEstimationPlugin.java
r1299 r1396 34 34 if(fan.getPowerInterface().getRecentPowerUsage().getValue() == -1){ 35 35 try { 36 powerConsumption = powerConsumption + fan.getAir ThroughputInterface().getPowerConsumption(fan.getAirThroughputInterface().getAirThroughputState())/getNumberOfWorkingNodes(fan);36 powerConsumption = powerConsumption + fan.getAirflowInterface().getPowerConsumption(fan.getAirflowInterface().getAirflowState())/getNumberOfWorkingNodes(fan); 37 37 } catch (NoSuchFieldException e) { 38 38 // TODO Auto-generated catch block -
DCWoRMS/branches/coolemall/src/example/energy/device/FanEnergyEstimationPlugin.java
r1207 r1396 3 3 import schedframe.events.scheduling.EventReason; 4 4 import schedframe.resources.computing.profiles.energy.EnergyEvent; 5 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAir ThroughputStateName;5 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 6 6 import schedframe.resources.devices.PhysicalResource; 7 7 import schedframe.scheduling.manager.tasks.JobRegistry; … … 15 15 try { 16 16 if(event.getReason() == EventReason.SIM_INIT) 17 powerConsumption = powerConsumption + resource.getAir ThroughputInterface().getPowerConsumption(StandardAirThroughputStateName.OFF);17 powerConsumption = powerConsumption + resource.getAirflowInterface().getPowerConsumption(StandardAirflowStateName.OFF); 18 18 else 19 powerConsumption = powerConsumption + resource.getAir ThroughputInterface().getPowerConsumption(resource.getAirThroughputInterface().getAirThroughputState());19 powerConsumption = powerConsumption + resource.getAirflowInterface().getPowerConsumption(resource.getAirflowInterface().getAirflowState()); 20 20 } catch (NoSuchFieldException e) { 21 21 } … … 24 24 } 25 25 26 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) {27 double air Throughput= 0;26 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource) { 27 double airflow= 0; 28 28 try { 29 29 if(event.getReason() == EventReason.SIM_INIT) 30 air Throughput = resource.getAirThroughputInterface().getAirFlow(StandardAirThroughputStateName.OFF);30 airflow = resource.getAirflowInterface().getAirflow(StandardAirflowStateName.OFF); 31 31 else 32 air Throughput = resource.getAirThroughputInterface().getAirFlow(resource.getAirThroughputInterface().getAirThroughputState());32 airflow = resource.getAirflowInterface().getAirflow(resource.getAirflowInterface().getAirflowState()); 33 33 } catch (NoSuchFieldException e) { 34 34 // TODO Auto-generated catch block 35 35 e.printStackTrace(); 36 36 } 37 return air Throughput;37 return airflow; 38 38 } 39 39 } -
DCWoRMS/branches/coolemall/src/example/globalplugin/BaseGlobalPlugin.java
r516 r1396 6 6 import schedframe.scheduling.TaskList; 7 7 import schedframe.scheduling.manager.resources.ResourceManager; 8 import schedframe.scheduling.plugin.ModuleList; 8 9 import schedframe.scheduling.plugin.SchedulingPluginConfiguration; 9 10 import schedframe.scheduling.plugin.grid.GlobalSchedulingPlugin; 10 import schedframe.scheduling.plugin.grid.ModuleList;11 11 import schedframe.scheduling.queue.TaskQueue; 12 12 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/globalplugin/GridFCFSLoadBalancingPlugin.java
r497 r1396 3 3 4 4 import java.util.List; 5 import java.util.Properties;6 5 7 6 import org.apache.commons.logging.Log; … … 16 15 import schedframe.scheduling.plan.impl.ScheduledTask; 17 16 import schedframe.scheduling.plan.impl.SchedulingPlan; 18 import schedframe.scheduling.plugin. grid.Module;19 import schedframe.scheduling.plugin. grid.ModuleList;17 import schedframe.scheduling.plugin.Module; 18 import schedframe.scheduling.plugin.ModuleList; 20 19 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 21 20 import schedframe.scheduling.queue.QueueDescription; -
DCWoRMS/branches/coolemall/src/example/globalplugin/GridFCFSRandomPlugin.java
r497 r1396 2 2 3 3 import java.util.List; 4 import java.util.Properties;5 4 import java.util.Random; 6 5 … … 13 12 import schedframe.scheduling.plan.impl.ScheduledTask; 14 13 import schedframe.scheduling.plan.impl.SchedulingPlan; 15 import schedframe.scheduling.plugin. grid.Module;16 import schedframe.scheduling.plugin. grid.ModuleList;14 import schedframe.scheduling.plugin.Module; 15 import schedframe.scheduling.plugin.ModuleList; 17 16 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 18 17 import schedframe.scheduling.queue.TaskQueue; … … 29 28 } 30 29 31 public SchedulingPlanInterface schedule(SchedulingEvent event,30 public SchedulingPlanInterface<?> schedule(SchedulingEvent event, 32 31 TaskQueueList queues, 33 32 JobRegistry jobRegistry, -
DCWoRMS/branches/coolemall/src/example/globalplugin/GridFCFSRoundRobinPlugin.java
r497 r1396 12 12 import schedframe.scheduling.plan.impl.ScheduledTask; 13 13 import schedframe.scheduling.plan.impl.SchedulingPlan; 14 import schedframe.scheduling.plugin. grid.Module;15 import schedframe.scheduling.plugin. grid.ModuleList;14 import schedframe.scheduling.plugin.Module; 15 import schedframe.scheduling.plugin.ModuleList; 16 16 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 17 17 import schedframe.scheduling.queue.TaskQueue; … … 24 24 private LinkedList<String> lastUsedResources = new LinkedList<String>(); 25 25 26 public SchedulingPlanInterface schedule(SchedulingEvent event,26 public SchedulingPlanInterface<?> schedule(SchedulingEvent event, 27 27 TaskQueueList queues, 28 28 JobRegistry jobRegistry, -
DCWoRMS/branches/coolemall/src/example/load/DefaultLoadEstimationPlugin.java
r1290 r1396 5 5 import schedframe.resources.devices.PhysicalResource; 6 6 import schedframe.scheduling.manager.tasks.JobRegistry; 7 import simulator.stats. GSSAccumulator;7 import simulator.stats.DCwormsAccumulator; 8 8 9 9 … … 13 13 14 14 ComputingResource computingResource = (ComputingResource) resource; 15 GSSAccumulator childrenLoad = new GSSAccumulator();15 DCwormsAccumulator childrenLoad = new DCwormsAccumulator(); 16 16 for(ComputingResource compRes: computingResource.getChildren()){ 17 17 childrenLoad.add(compRes.getLoadInterface().getRecentUtilization().getValue()); -
DCWoRMS/branches/coolemall/src/example/load/ProcessorLoadEstimationPlugin.java
r1299 r1396 26 26 double cpuUsage = 1 / nrOfThreadsOnCpu; 27 27 28 for(PhaseBehaviour pb: task.get CurrentResourceConsumption().getBehaviourList()){28 for(PhaseBehaviour pb: task.getExecutionProfile().getCurrentResourceConsumption().getBehaviourList()){ 29 29 if(pb.getResouceName().equals("PM_CPU_Usage")){ 30 30 cpuUsage = pb.getUtilization(); -
DCWoRMS/branches/coolemall/src/example/localplugin/BaseLocalSchedulingPlugin.java
r555 r1396 17 17 import schedframe.scheduling.plan.impl.ScheduledTask; 18 18 import schedframe.scheduling.plan.impl.SchedulingPlan; 19 import schedframe.scheduling.plugin.ModuleList; 19 20 import schedframe.scheduling.plugin.SchedulingPluginConfiguration; 20 import schedframe.scheduling.plugin.grid.ModuleList;21 21 import schedframe.scheduling.plugin.local.LocalSchedulingPlugin; 22 22 import schedframe.scheduling.queue.TaskQueue; -
DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ConsolidationHighPerf_NodePowMan_Plugin.java
r1299 r1396 17 17 import schedframe.resources.computing.Node; 18 18 import schedframe.resources.computing.Processor; 19 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAir ThroughputStateName;19 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 20 20 import schedframe.resources.computing.profiles.energy.power.PState; 21 21 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 30 30 import schedframe.scheduling.plan.SchedulingPlanInterface; 31 31 import schedframe.scheduling.plan.impl.SchedulingPlan; 32 import schedframe.scheduling.plugin. grid.ModuleList;32 import schedframe.scheduling.plugin.ModuleList; 33 33 import schedframe.scheduling.queue.TaskQueue; 34 34 import schedframe.scheduling.queue.TaskQueueList; … … 169 169 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 170 170 if(device.getType().equals(StandardResourceType.Fan)){ 171 device.getAir ThroughputInterface().setAirThroughputState(StandardAirThroughputStateName.ON);171 device.getAirflowInterface().setAirflowState(StandardAirflowStateName.ON); 172 172 break; 173 173 } … … 192 192 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 193 193 if(device.getType().equals(StandardResourceType.Fan)){ 194 device.getAir ThroughputInterface().setAirThroughputState(StandardAirThroughputStateName.OFF);194 device.getAirflowInterface().setAirflowState(StandardAirflowStateName.OFF); 195 195 break; 196 196 } -
DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ConsolidationLowPower_NodePowMan_Plugin.java
r1299 r1396 17 17 import schedframe.resources.computing.Node; 18 18 import schedframe.resources.computing.Processor; 19 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAir ThroughputStateName;19 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 20 20 import schedframe.resources.computing.profiles.energy.power.PState; 21 21 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 30 30 import schedframe.scheduling.plan.SchedulingPlanInterface; 31 31 import schedframe.scheduling.plan.impl.SchedulingPlan; 32 import schedframe.scheduling.plugin. grid.ModuleList;32 import schedframe.scheduling.plugin.ModuleList; 33 33 import schedframe.scheduling.queue.TaskQueue; 34 34 import schedframe.scheduling.queue.TaskQueueList; … … 168 168 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 169 169 if(device.getType().equals(StandardResourceType.Fan)){ 170 device.getAir ThroughputInterface().setAirThroughputState(StandardAirThroughputStateName.ON);170 device.getAirflowInterface().setAirflowState(StandardAirflowStateName.ON); 171 171 break; 172 172 } … … 191 191 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 192 192 if(device.getType().equals(StandardResourceType.Fan)){ 193 device.getAir ThroughputInterface().setAirThroughputState(StandardAirThroughputStateName.OFF);193 device.getAirflowInterface().setAirflowState(StandardAirflowStateName.OFF); 194 194 break; 195 195 } -
DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_DFSPlugin.java
r1299 r1396 21 21 import schedframe.scheduling.plan.SchedulingPlanInterface; 22 22 import schedframe.scheduling.plan.impl.SchedulingPlan; 23 import schedframe.scheduling.plugin. grid.ModuleList;23 import schedframe.scheduling.plugin.ModuleList; 24 24 import schedframe.scheduling.queue.TaskQueue; 25 25 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_ExamplePlugin.java
r1299 r1396 25 25 import schedframe.scheduling.plan.SchedulingPlanInterface; 26 26 import schedframe.scheduling.plan.impl.SchedulingPlan; 27 import schedframe.scheduling.plugin. grid.ModuleList;27 import schedframe.scheduling.plugin.ModuleList; 28 28 import schedframe.scheduling.queue.TaskQueue; 29 29 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/Cluster_FCFSBF_RandomPlugin.java
r1258 r1396 13 13 import schedframe.scheduling.plan.SchedulingPlanInterface; 14 14 import schedframe.scheduling.plan.impl.SchedulingPlan; 15 import schedframe.scheduling.plugin. grid.ModuleList;15 import schedframe.scheduling.plugin.ModuleList; 16 16 import schedframe.scheduling.queue.TaskQueue; 17 17 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/FCFSBF_LocalPlugin.java
r888 r1396 6 6 import schedframe.scheduling.manager.tasks.JobRegistry; 7 7 import schedframe.scheduling.plan.impl.SchedulingPlan; 8 import schedframe.scheduling.plugin. grid.ModuleList;8 import schedframe.scheduling.plugin.ModuleList; 9 9 import schedframe.scheduling.queue.TaskQueue; 10 10 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationHighPerf_NodePowMan_SP.java
r1299 r1396 16 16 import schedframe.resources.computing.Core; 17 17 import schedframe.resources.computing.Processor; 18 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;18 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 19 19 import schedframe.resources.computing.profiles.energy.power.PState; 20 20 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 31 31 import schedframe.scheduling.plan.SchedulingPlanInterface; 32 32 import schedframe.scheduling.plan.impl.SchedulingPlan; 33 import schedframe.scheduling.plugin. grid.ModuleList;33 import schedframe.scheduling.plugin.ModuleList; 34 34 import schedframe.scheduling.queue.TaskQueue; 35 35 import schedframe.scheduling.queue.TaskQueueList; … … 226 226 Fan fan = (Fan) device; 227 227 if(fan.getChilledResources().contains(node.getFullName())){ 228 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));228 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 229 229 } 230 230 } … … 262 262 if(fan.getChilledResources().contains(node.getFullName())){ 263 263 if(nrOfChilldedNodes == 1) 264 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));264 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 265 265 else { 266 266 for(String chilledNode: fan.getChilledResources()){ … … 274 274 } 275 275 if(nrOfChilldedNodes <= 1) 276 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));276 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 277 277 } 278 278 -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationHighPerf_SP.java
r1299 r1396 25 25 import schedframe.scheduling.plan.SchedulingPlanInterface; 26 26 import schedframe.scheduling.plan.impl.SchedulingPlan; 27 import schedframe.scheduling.plugin. grid.ModuleList;27 import schedframe.scheduling.plugin.ModuleList; 28 28 import schedframe.scheduling.queue.TaskQueue; 29 29 import schedframe.scheduling.queue.TaskQueueList; … … 72 72 } 73 73 74 @SuppressWarnings("unchecked")75 74 private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution( 76 75 ClusterResourceManager resourceManager, TaskInterface<?> task) { -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationLowPower_NodePowMan_SP.java
r1299 r1396 16 16 import schedframe.resources.computing.Node; 17 17 import schedframe.resources.computing.Processor; 18 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;18 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 19 19 import schedframe.resources.computing.profiles.energy.power.PState; 20 20 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 31 31 import schedframe.scheduling.plan.SchedulingPlanInterface; 32 32 import schedframe.scheduling.plan.impl.SchedulingPlan; 33 import schedframe.scheduling.plugin. grid.ModuleList;33 import schedframe.scheduling.plugin.ModuleList; 34 34 import schedframe.scheduling.queue.TaskQueue; 35 35 import schedframe.scheduling.queue.TaskQueueList; … … 226 226 Fan fan = (Fan) device; 227 227 if(fan.getChilledResources().contains(node.getFullName())){ 228 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));228 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 229 229 } 230 230 } … … 262 262 if(fan.getChilledResources().contains(node.getFullName())){ 263 263 if(nrOfChilldedNodes == 1) 264 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));264 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 265 265 else { 266 266 for(String chilledNode: fan.getChilledResources()){ … … 274 274 } 275 275 if(nrOfChilldedNodes <= 1) 276 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));276 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 277 277 } 278 278 -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_ConsolidationLowPower_SP.java
r1299 r1396 25 25 import schedframe.scheduling.plan.SchedulingPlanInterface; 26 26 import schedframe.scheduling.plan.impl.SchedulingPlan; 27 import schedframe.scheduling.plugin. grid.ModuleList;27 import schedframe.scheduling.plugin.ModuleList; 28 28 import schedframe.scheduling.queue.TaskQueue; 29 29 import schedframe.scheduling.queue.TaskQueueList; … … 72 72 } 73 73 74 @SuppressWarnings("unchecked")75 74 private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution( 76 75 ClusterResourceManager resourceManager, TaskInterface<?> task) { -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_LoadBalancing_SP.java
r1258 r1396 11 11 import schedframe.scheduling.plan.SchedulingPlanInterface; 12 12 import schedframe.scheduling.plan.impl.SchedulingPlan; 13 import schedframe.scheduling.plugin. grid.ModuleList;13 import schedframe.scheduling.plugin.ModuleList; 14 14 import schedframe.scheduling.queue.TaskQueue; 15 15 import schedframe.scheduling.queue.TaskQueueList; … … 54 54 } 55 55 56 @SuppressWarnings("unchecked")57 56 private String chooseProvider(ClusterResourceManager resourceManager) { 58 57 List<Node> nodes = resourceManager.getNodes(); -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox1/CB1_FCFS_Random_SP.java
r1258 r1396 21 21 import schedframe.scheduling.plan.SchedulingPlanInterface; 22 22 import schedframe.scheduling.plan.impl.SchedulingPlan; 23 import schedframe.scheduling.plugin. grid.ModuleList;23 import schedframe.scheduling.plugin.ModuleList; 24 24 import schedframe.scheduling.queue.TaskQueue; 25 25 import schedframe.scheduling.queue.TaskQueueList; … … 70 70 } 71 71 72 @SuppressWarnings("unchecked")73 72 private Map<ResourceUnitName, ResourceUnit> chooseResourcesForExecution( 74 73 ClusterResourceManager resourceManager, TaskInterface<?> task) { -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationHighPerf_NodePowMan_SP.java
r1299 r1396 17 17 import schedframe.resources.computing.Processor; 18 18 import schedframe.resources.computing.Rack; 19 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;19 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 20 20 import schedframe.resources.computing.profiles.energy.power.PState; 21 21 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 32 32 import schedframe.scheduling.plan.SchedulingPlanInterface; 33 33 import schedframe.scheduling.plan.impl.SchedulingPlan; 34 import schedframe.scheduling.plugin. grid.ModuleList;34 import schedframe.scheduling.plugin.ModuleList; 35 35 import schedframe.scheduling.queue.TaskQueue; 36 36 import schedframe.scheduling.queue.TaskQueueList; … … 227 227 Fan fan = (Fan) device; 228 228 if(fan.getChilledResources().contains(node.getFullName())){ 229 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));229 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 230 230 } 231 231 } … … 263 263 if(fan.getChilledResources().contains(node.getFullName())){ 264 264 if(nrOfChilldedNodes == 1) 265 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));265 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 266 266 else { 267 267 for(String chilledNode: fan.getChilledResources()){ … … 275 275 } 276 276 if(nrOfChilldedNodes <= 1) 277 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));277 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 278 278 } 279 279 -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationHighPerf_PowerCapping_SP.java
r1319 r1396 20 20 import schedframe.resources.computing.coolemall.ComputeBox1; 21 21 import schedframe.resources.computing.coolemall.NodeGroup; 22 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;22 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 23 23 import schedframe.resources.computing.profiles.energy.power.PState; 24 24 import schedframe.resources.devices.Device; … … 34 34 import schedframe.scheduling.plan.SchedulingPlanInterface; 35 35 import schedframe.scheduling.plan.impl.SchedulingPlan; 36 import schedframe.scheduling.plugin. grid.ModuleList;36 import schedframe.scheduling.plugin.ModuleList; 37 37 import schedframe.scheduling.queue.TaskQueue; 38 38 import schedframe.scheduling.queue.TaskQueueList; … … 364 364 365 365 if(fan.getChilledResources().contains(n.getFullName())){ 366 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));366 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 367 367 } 368 368 } … … 457 457 458 458 if(fan.getChilledResources().contains(n.getFullName())){ 459 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));459 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 460 460 } 461 461 } … … 546 546 for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 547 547 try { 548 fpc = fpc + device.getAir ThroughputInterface().getPowerConsumption(new UserAirThroughputStateName("2"));548 fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("2")); 549 549 } catch (NoSuchFieldException e) { 550 550 // TODO Auto-generated catch block -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationHighPerf_SP.java
r1299 r1396 26 26 import schedframe.scheduling.plan.SchedulingPlanInterface; 27 27 import schedframe.scheduling.plan.impl.SchedulingPlan; 28 import schedframe.scheduling.plugin. grid.ModuleList;28 import schedframe.scheduling.plugin.ModuleList; 29 29 import schedframe.scheduling.queue.TaskQueue; 30 30 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationLowPower_NodePowMan_SP.java
r1299 r1396 16 16 import schedframe.resources.computing.Node; 17 17 import schedframe.resources.computing.Processor; 18 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;18 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 19 19 import schedframe.resources.computing.profiles.energy.power.PState; 20 20 import schedframe.resources.computing.profiles.energy.power.StandardPowerStateName; … … 31 31 import schedframe.scheduling.plan.SchedulingPlanInterface; 32 32 import schedframe.scheduling.plan.impl.SchedulingPlan; 33 import schedframe.scheduling.plugin. grid.ModuleList;33 import schedframe.scheduling.plugin.ModuleList; 34 34 import schedframe.scheduling.queue.TaskQueue; 35 35 import schedframe.scheduling.queue.TaskQueueList; … … 226 226 Fan fan = (Fan) device; 227 227 if(fan.getChilledResources().contains(node.getFullName())){ 228 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));228 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 229 229 } 230 230 } … … 262 262 if(fan.getChilledResources().contains(node.getFullName())){ 263 263 if(nrOfChilldedNodes == 1) 264 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));264 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 265 265 else { 266 266 for(String chilledNode: fan.getChilledResources()){ … … 274 274 } 275 275 if(nrOfChilldedNodes <= 1) 276 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("1"));276 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("1")); 277 277 } 278 278 -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationLowPower_PowerCapping_SP.java
r1319 r1396 20 20 import schedframe.resources.computing.coolemall.ComputeBox1; 21 21 import schedframe.resources.computing.coolemall.NodeGroup; 22 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;22 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 23 23 import schedframe.resources.computing.profiles.energy.power.PState; 24 24 import schedframe.resources.devices.Device; … … 34 34 import schedframe.scheduling.plan.SchedulingPlanInterface; 35 35 import schedframe.scheduling.plan.impl.SchedulingPlan; 36 import schedframe.scheduling.plugin. grid.ModuleList;36 import schedframe.scheduling.plugin.ModuleList; 37 37 import schedframe.scheduling.queue.TaskQueue; 38 38 import schedframe.scheduling.queue.TaskQueueList; … … 282 282 283 283 if(fan.getChilledResources().contains(n.getFullName())){ 284 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));284 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 285 285 } 286 286 } … … 375 375 376 376 if(fan.getChilledResources().contains(n.getFullName())){ 377 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));377 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 378 378 } 379 379 } … … 464 464 for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 465 465 try { 466 fpc = fpc + device.getAir ThroughputInterface().getPowerConsumption(new UserAirThroughputStateName("2"));466 fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("2")); 467 467 } catch (NoSuchFieldException e) { 468 468 // TODO Auto-generated catch block -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_ConsolidationLowPower_SP.java
r1299 r1396 25 25 import schedframe.scheduling.plan.SchedulingPlanInterface; 26 26 import schedframe.scheduling.plan.impl.SchedulingPlan; 27 import schedframe.scheduling.plugin. grid.ModuleList;27 import schedframe.scheduling.plugin.ModuleList; 28 28 import schedframe.scheduling.queue.TaskQueue; 29 29 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_LoadBalancing_SP.java
r1319 r1396 11 11 import schedframe.scheduling.plan.SchedulingPlanInterface; 12 12 import schedframe.scheduling.plan.impl.SchedulingPlan; 13 import schedframe.scheduling.plugin. grid.ModuleList;13 import schedframe.scheduling.plugin.ModuleList; 14 14 import schedframe.scheduling.queue.TaskQueue; 15 15 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Random_PowerCapping_SP.java
r1319 r1396 19 19 import schedframe.resources.computing.coolemall.ComputeBox1; 20 20 import schedframe.resources.computing.coolemall.NodeGroup; 21 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;21 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 22 22 import schedframe.resources.computing.profiles.energy.power.PState; 23 23 import schedframe.resources.devices.Device; … … 32 32 import schedframe.scheduling.plan.SchedulingPlanInterface; 33 33 import schedframe.scheduling.plan.impl.SchedulingPlan; 34 import schedframe.scheduling.plugin. grid.ModuleList;34 import schedframe.scheduling.plugin.ModuleList; 35 35 import schedframe.scheduling.queue.TaskQueue; 36 36 import schedframe.scheduling.queue.TaskQueueList; … … 245 245 246 246 if(fan.getChilledResources().contains(n.getFullName())){ 247 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));247 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 248 248 } 249 249 } … … 338 338 339 339 if(fan.getChilledResources().contains(n.getFullName())){ 340 fan.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("2"));340 fan.getAirflowInterface().setAirflowState(new CustomAirflowStateName("2")); 341 341 } 342 342 } … … 427 427 for(Device device: nodeGroup.getResourceCharacteristic().getDevices()){ 428 428 try { 429 fpc = fpc + device.getAir ThroughputInterface().getPowerConsumption(new UserAirThroughputStateName("2"));429 fpc = fpc + device.getAirflowInterface().getPowerConsumption(new CustomAirflowStateName("2")); 430 430 } catch (NoSuchFieldException e) { 431 431 // TODO Auto-generated catch block -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/computebox2/CB2_FCFS_Random_SP.java
r1319 r1396 23 23 import schedframe.scheduling.plan.SchedulingPlanInterface; 24 24 import schedframe.scheduling.plan.impl.SchedulingPlan; 25 import schedframe.scheduling.plugin. grid.ModuleList;25 import schedframe.scheduling.plugin.ModuleList; 26 26 import schedframe.scheduling.queue.TaskQueue; 27 27 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Consolidation_SP.java
r1258 r1396 25 25 import schedframe.scheduling.plan.SchedulingPlanInterface; 26 26 import schedframe.scheduling.plan.impl.SchedulingPlan; 27 import schedframe.scheduling.plugin. grid.ModuleList;27 import schedframe.scheduling.plugin.ModuleList; 28 28 import schedframe.scheduling.queue.TaskQueue; 29 29 import schedframe.scheduling.queue.TaskQueueList; -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_LB_SP.java
r1258 r1396 11 11 import schedframe.scheduling.plan.SchedulingPlanInterface; 12 12 import schedframe.scheduling.plan.impl.SchedulingPlan; 13 import schedframe.scheduling.plugin. grid.ModuleList;13 import schedframe.scheduling.plugin.ModuleList; 14 14 import schedframe.scheduling.queue.TaskQueue; 15 15 import schedframe.scheduling.queue.TaskQueueList; … … 55 55 } 56 56 57 @SuppressWarnings("unchecked")58 57 private String chooseProvider(ClusterResourceManager resourceManager) { 59 58 List<Node> nodes = resourceManager.getNodes(); -
DCWoRMS/branches/coolemall/src/example/localplugin/coolemall/recs/RECS_FCFS_Random_SP.java
r1258 r1396 12 12 import schedframe.resources.computing.Core; 13 13 import schedframe.resources.computing.Node; 14 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;14 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 15 15 import schedframe.resources.devices.Device; 16 16 import schedframe.resources.units.ProcessingElements; … … 23 23 import schedframe.scheduling.plan.SchedulingPlanInterface; 24 24 import schedframe.scheduling.plan.impl.SchedulingPlan; 25 import schedframe.scheduling.plugin. grid.ModuleList;25 import schedframe.scheduling.plugin.ModuleList; 26 26 import schedframe.scheduling.queue.TaskQueue; 27 27 import schedframe.scheduling.queue.TaskQueueList; … … 79 79 } 80 80 81 @SuppressWarnings("unchecked")82 81 private Node chooseRandomProvider(ClusterResourceManager resourceManager) { 83 82 List<Node> nodes = resourceManager.getNodes(); … … 184 183 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 185 184 if(device.getFullName().equals(Node_Fan_Mapping.getNode_fan().get(node.getFullName()))){ 186 device.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("Off"));185 device.getAirflowInterface().setAirflowState(new CustomAirflowStateName("Off")); 187 186 break; 188 187 } … … 192 191 for(Device device: node.getParent().getResourceCharacteristic().getDevices()){ 193 192 if(device.getFullName().equals(Node_Fan_Mapping.getNode_fan().get(node.getFullName()))){ 194 device.getAir ThroughputInterface().setAirThroughputState(new UserAirThroughputStateName("On"));193 device.getAirflowInterface().setAirflowState(new CustomAirflowStateName("On")); 195 194 break; 196 195 } -
DCWoRMS/branches/coolemall/src/example/timeestimation/coolemall/CPUFreqScalingPhaseTimeEstimationPlugin.java
r1364 r1396 2 2 3 3 import java.util.Map; 4 5 import org.joda.time.DateTime;6 4 7 5 import schedframe.events.scheduling.SchedulingEvent; … … 14 12 import schedframe.resources.units.ResourceUnitName; 15 13 import schedframe.resources.units.StandardResourceUnitName; 16 import schedframe.scheduling.tasks.phases.ResourceConsumption;17 14 import dcworms.schedframe.scheduling.ExecTask; 18 import dcworms.schedframe.scheduling.Executable;19 15 import example.timeestimation.BaseTimeEstimationPlugin; 20 16 … … 26 22 double completionPercentage) { 27 23 28 String taskFreqString = task.get CurrentResourceConsumption().getReferenceHardware().get("cpu_maxfreq");24 String taskFreqString = task.getExecutionProfile().getCurrentResourceConsumption().getReferenceHardware().get("cpu_maxfreq"); 29 25 double taskFreq = Double.valueOf(taskFreqString); 30 26 … … 49 45 currentFrequency = taskFreq; 50 46 51 double execTime = (1 - completionPercentage/100) * task.get CurrentResourceConsumption().getDuration() * (taskFreq / currentFrequency);47 double execTime = (1 - completionPercentage/100) * task.getExecutionProfile().getCurrentResourceConsumption().getDuration() * (taskFreq / currentFrequency); 52 48 53 49 // if the result is very close to 0, but less then one millisecond then round this result to 0.001 -
DCWoRMS/branches/coolemall/src/example/timeestimation/coolemall/PhaseTimeEstimationPlugin.java
r1253 r1396 25 25 Executable exec = (Executable) task; 26 26 27 ResourceConsumption resConsumption = exec.get ResourceConsumptionProfile().getCurrentResourceConsumption();27 ResourceConsumption resConsumption = exec.getExecutionProfile().getCurrentResourceConsumption(); 28 28 29 29 double execTime = (1 - completionPercentage/100) * resConsumption.getDuration(); -
DCWoRMS/branches/coolemall/src/schedframe/SimulatedEnvironment.java
r1207 r1396 11 11 12 12 import schedframe.exceptions.ResourceException; 13 import schedframe.resources.ResourceHistory Changes;13 import schedframe.resources.ResourceHistoryItem; 14 14 import schedframe.resources.computing.ComputingResource; 15 15 import schedframe.scheduling.Scheduler; … … 21 21 protected List<Initializable> toInit; 22 22 protected Set<String> compResLayers; 23 protected static List<ResourceHistory Changes> compResHistory = new ArrayList<ResourceHistoryChanges>();23 protected static List<ResourceHistoryItem> compResHistory = new ArrayList<ResourceHistoryItem>(); 24 24 25 25 public SimulatedEnvironment(Scheduler logicalStructure, List<ComputingResource> compResources){ … … 156 156 157 157 public static void traceResource(long timestamp, String resourceName, String operation, String paramter){ 158 ResourceHistory Changes rhc = new ResourceHistoryChanges(timestamp, resourceName, operation, paramter);158 ResourceHistoryItem rhc = new ResourceHistoryItem(timestamp, resourceName, operation, paramter); 159 159 compResHistory.add(rhc); 160 160 } 161 161 162 public static List<ResourceHistory Changes> getCompResHistory() {162 public static List<ResourceHistoryItem> getCompResHistory() { 163 163 return compResHistory; 164 164 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/CustomResourceType.java
r477 r1396 2 2 3 3 4 public class UserResourceType implements ResourceType {4 public class CustomResourceType implements ResourceType { 5 5 6 6 protected String name; 7 7 8 public UserResourceType(String name) {8 public CustomResourceType(String name) { 9 9 this.name = name; 10 10 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/ResourceHistoryItem.java
r1207 r1396 2 2 3 3 4 public class ResourceHistory Changes{4 public class ResourceHistoryItem { 5 5 6 6 private long timestamp; 7 7 private String resourceName; 8 private String operation;8 private String action; 9 9 private String paramter; 10 10 11 public ResourceHistory Changes(long timestamp, String resourceName, String operation, String paramter) {11 public ResourceHistoryItem(long timestamp, String resourceName, String action, String paramter) { 12 12 super(); 13 13 this.timestamp = timestamp; 14 14 this.resourceName = resourceName; 15 this. operation = operation;15 this.action = action; 16 16 this.paramter = paramter; 17 17 } … … 25 25 } 26 26 27 public String get Operation() {28 return operation;27 public String getAction() { 28 return action; 29 29 } 30 30 -
DCWoRMS/branches/coolemall/src/schedframe/resources/ResourceTypeFactory.java
r1207 r1396 60 60 return StandardResourceType.LS; 61 61 62 return new UserResourceType(typeName);62 return new CustomResourceType(typeName); 63 63 } 64 64 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/ComputingResource.java
r1392 r1396 57 57 initCharacteristics(resDesc); 58 58 accept(new LoadExtension(resDesc.getLoadProfile(), this)); 59 accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).air FlowProfile(resDesc.getAirThroughputProfile()).thermalProfile(resDesc.getThermalProfile()).build());59 accept(new EnergyExtension.Builder().resource(this).powerProfile(resDesc.getPowerProfile()).airflowProfile(resDesc.getAirflowProfile()).thermalProfile(resDesc.getThermalProfile()).build()); 60 60 } 61 61 -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/EnergyExtension.java
r1389 r1396 10 10 import schedframe.resources.computing.extensions.ExtensionException; 11 11 import schedframe.resources.computing.extensions.ExtensionType; 12 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputInterfaceFactory;13 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputProfile;14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.Air ThroughputInterface;12 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowInterfaceFactory; 13 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 15 15 import schedframe.resources.computing.profiles.energy.power.PowerInterfaceFactory; 16 16 import schedframe.resources.computing.profiles.energy.power.PowerProfile; … … 30 30 protected PowerProfile powerProfile; 31 31 32 protected Air ThroughputInterface airFlowInterface;33 protected Air ThroughputProfile airFlowProfile;32 protected AirflowInterface airflowInterface; 33 protected AirflowProfile airflowProfile; 34 34 35 35 protected ThermalInterface thermalInterface; … … 74 74 protected PowerProfile powerProfile; 75 75 76 protected Air ThroughputInterface airFlowInterface;77 protected Air ThroughputProfile airFlowProfile;76 protected AirflowInterface airflowInterface; 77 protected AirflowProfile airflowProfile; 78 78 79 79 protected ThermalInterface thermalInterface; … … 84 84 public Builder powerProfile(PowerProfile pp){this.powerProfile = pp; this.powerInterface = PowerInterfaceFactory.createPowerInterface(resource, powerProfile); return this; } 85 85 86 public Builder air FlowProfile(AirThroughputProfile atp){this.airFlowProfile = atp; this.airFlowInterface = AirThroughputInterfaceFactory.createAirThroughputInterface(resource, airFlowProfile); return this; }86 public Builder airflowProfile(AirflowProfile atp){this.airflowProfile = atp; this.airflowInterface = AirflowInterfaceFactory.createAirflowInterface(resource, airflowProfile); return this; } 87 87 88 88 public Builder thermalProfile(ThermalProfile tp){this.thermalProfile = tp; this.thermalInterface = ThermalInterfaceFactory.createThermalInterface(resource, thermalProfile); return this; } … … 98 98 this.powerProfile = builder.powerProfile; 99 99 100 this.air FlowInterface = builder.airFlowInterface ;101 this.air FlowProfile = builder.airFlowProfile;100 this.airflowInterface = builder.airflowInterface ; 101 this.airflowProfile = builder.airflowProfile; 102 102 103 103 this.thermalInterface = builder.thermalInterface; … … 163 163 164 164 case AIRFLOW_STATE_CHANGED: 165 double air Flow = powerProfile.getEnergyEstimationPlugin().estimateAirThroughput(enEvent, new JobRegistryImpl(resource.getFullName()), resource);166 air FlowProfile.addToAirFlowHistory(airFlow);165 double airflow = powerProfile.getEnergyEstimationPlugin().estimateAirflow(enEvent, new JobRegistryImpl(resource.getFullName()), resource); 166 airflowProfile.addToAirFlowHistory(airflow); 167 167 break; 168 168 … … 204 204 } 205 205 206 public Air ThroughputInterface getAirThroughputInterface() {207 return air FlowInterface;208 } 209 210 public Air ThroughputProfile getAirFlowProfile() {211 return air FlowProfile;206 public AirflowInterface getAirflowInterface() { 207 return airflowInterface; 208 } 209 210 public AirflowProfile getAirFlowProfile() { 211 return airflowProfile; 212 212 } 213 213 -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirFlowValue.java
r495 r1396 3 3 import schedframe.resources.computing.profiles.energy.MeasurementHistory; 4 4 5 public class Air FlowValue extends MeasurementHistory{5 public class AirflowValue extends MeasurementHistory{ 6 6 7 public Air FlowValue(long timestamp, double value){7 public AirflowValue(long timestamp, double value){ 8 8 super(timestamp, value); 9 9 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowInterfaceFactory.java
r1318 r1396 3 3 import schedframe.resources.StandardResourceType; 4 4 import schedframe.resources.computing.ComputingResource; 5 import schedframe.resources.computing.profiles.energy.airthroughput.ui.Air ThroughputInterface;6 import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAir ThroughputInterface;5 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 6 import schedframe.resources.computing.profiles.energy.airthroughput.ui.ComputingResourceAirflowInterface; 7 7 import schedframe.resources.devices.PhysicalResource; 8 import schedframe.resources.devices.DeviceAir ThroughputInterface;9 import schedframe.resources.devices.coolemall.FanAir ThroughputInterface;8 import schedframe.resources.devices.DeviceAirflowInterface; 9 import schedframe.resources.devices.coolemall.FanAirflowInterface; 10 10 11 public class Air ThroughputInterfaceFactory {11 public class AirflowInterfaceFactory { 12 12 13 public static Air ThroughputInterface createAirThroughputInterface(PhysicalResource resource, AirThroughputProfile atp){13 public static AirflowInterface createAirflowInterface(PhysicalResource resource, AirflowProfile atp){ 14 14 if(atp == null) 15 15 return null; 16 Air ThroughputInterface airThroughputInterface = null;16 AirflowInterface airflowInterface = null; 17 17 if(resource.getType().getName().equals(StandardResourceType.CRAH.getName())) 18 air ThroughputInterface = new DeviceAirThroughputInterface(resource, atp);18 airflowInterface = new DeviceAirflowInterface(resource, atp); 19 19 else if(resource.getType().getName().equals(StandardResourceType.Fan.getName())) 20 air ThroughputInterface = new FanAirThroughputInterface(resource, atp);20 airflowInterface = new FanAirflowInterface(resource, atp); 21 21 else if(resource.getType().getName().equals(StandardResourceType.Inlet.getName())) 22 air ThroughputInterface = new FanAirThroughputInterface(resource, atp);22 airflowInterface = new FanAirflowInterface(resource, atp); 23 23 else if(resource.getType().getName().equals(StandardResourceType.Outlet.getName())) 24 air ThroughputInterface = new FanAirThroughputInterface(resource, atp);24 airflowInterface = new FanAirflowInterface(resource, atp); 25 25 else if(resource.getType().getName().equals(StandardResourceType.CoolingDevice.getName())) 26 air ThroughputInterface = new DeviceAirThroughputInterface(resource, atp);26 airflowInterface = new DeviceAirflowInterface(resource, atp); 27 27 else 28 air ThroughputInterface = new ComputingResourceAirThroughputInterface((ComputingResource)resource, atp);29 return air ThroughputInterface;28 airflowInterface = new ComputingResourceAirflowInterface((ComputingResource)resource, atp); 29 return airflowInterface; 30 30 } 31 31 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowProfile.java
r1207 r1396 7 7 8 8 import schedframe.Parameters; 9 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.Air ThroughputEstimationPlugin;9 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirflowEstimationPlugin; 10 10 11 public class Air ThroughputProfile {11 public class AirflowProfile { 12 12 13 protected List<Air FlowValue> airFlowHistory;13 protected List<AirflowValue> airflowHistory; 14 14 15 protected Air ThroughputEstimationPlugin airThroughputEstimationPlugin;16 protected List <Air ThroughputState> airThroughputStates;15 protected AirflowEstimationPlugin airflowEstimationPlugin; 16 protected List <AirflowState> airflowStates; 17 17 protected Parameters parameters; 18 18 19 public Air ThroughputProfile(AirThroughputEstimationPlugin airThroughputEstimationPlugin, List<AirThroughputState> airThroughputStates) {19 public AirflowProfile(AirflowEstimationPlugin airflowEstimationPlugin, List<AirflowState> airflowStates) { 20 20 super(); 21 this.air ThroughputEstimationPlugin = airThroughputEstimationPlugin;22 this.air ThroughputStates = airThroughputStates;23 this.air FlowHistory = new ArrayList<AirFlowValue>();21 this.airflowEstimationPlugin = airflowEstimationPlugin; 22 this.airflowStates = airflowStates; 23 this.airflowHistory = new ArrayList<AirflowValue>(); 24 24 } 25 25 26 public List<Air ThroughputState> getAirThroughputStates() {27 return air ThroughputStates;26 public List<AirflowState> getAirflowStates() { 27 return airflowStates; 28 28 } 29 29 30 public void addToAirFlowHistory(double air Flow) {30 public void addToAirFlowHistory(double airflow) { 31 31 32 if (air FlowHistory.size() == 0) {33 Air FlowValue usage = new AirFlowValue(DateTimeUtils.currentTimeMillis(), airFlow);34 air FlowHistory.add(usage);32 if (airflowHistory.size() == 0) { 33 AirflowValue usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 34 airflowHistory.add(usage); 35 35 return; 36 36 } 37 37 38 int lastIdx = air FlowHistory.size() - 1;39 double lastAir Flow = airFlowHistory.get(lastIdx).getValue();40 if (lastAir Flow != airFlow) {41 Air FlowValue usage = airFlowHistory.get(lastIdx);38 int lastIdx = airflowHistory.size() - 1; 39 double lastAirflow = airflowHistory.get(lastIdx).getValue(); 40 if (lastAirflow != airflow) { 41 AirflowValue usage = airflowHistory.get(lastIdx); 42 42 long currentTime = DateTimeUtils.currentTimeMillis(); 43 43 if (usage.getTimestamp() == currentTime) { 44 usage.setValue(air Flow);45 if(lastIdx > 0 && air FlowHistory.get(lastIdx - 1).getValue() == airFlow)46 air FlowHistory.remove(usage);44 usage.setValue(airflow); 45 if(lastIdx > 0 && airflowHistory.get(lastIdx - 1).getValue() == airflow) 46 airflowHistory.remove(usage); 47 47 } else { 48 usage = new Air FlowValue(DateTimeUtils.currentTimeMillis(), airFlow);49 air FlowHistory.add(usage);48 usage = new AirflowValue(DateTimeUtils.currentTimeMillis(), airflow); 49 airflowHistory.add(usage); 50 50 } 51 51 } 52 52 } 53 53 54 public List<Air FlowValue> getAirThroughputHistory() {55 return air FlowHistory;54 public List<AirflowValue> getAirflowHistory() { 55 return airflowHistory; 56 56 } 57 57 -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowState.java
r477 r1396 3 3 import schedframe.Parameters; 4 4 5 public class Air ThroughputState {5 public class AirflowState { 6 6 7 protected Stringname;7 protected AirflowStateName name; 8 8 protected double value; 9 9 protected double powerUsage; 10 10 11 public Air ThroughputState(Stringname, double value, double powerUsage) {11 public AirflowState(AirflowStateName name, double value, double powerUsage) { 12 12 super(); 13 13 this.name = name; … … 16 16 } 17 17 18 public StringgetName() {18 public AirflowStateName getName() { 19 19 return name; 20 20 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/AirflowStateName.java
r753 r1396 1 1 package schedframe.resources.computing.profiles.energy.airthroughput; 2 2 3 public interface Air ThroughputStateName {3 public interface AirflowStateName { 4 4 5 public String get Name();5 public String getLabel(); 6 6 7 7 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/CustomAirflowStateName.java
r753 r1396 2 2 3 3 4 public class UserAirThroughputStateName implements AirThroughputStateName{4 public class CustomAirflowStateName implements AirflowStateName{ 5 5 6 6 protected String name; 7 7 8 public UserAirThroughputStateName(String name) {8 public CustomAirflowStateName(String name) { 9 9 this.name = name; 10 10 } 11 11 12 public String get Name() {12 public String getLabel() { 13 13 return name; 14 14 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/StandardAirflowStateName.java
r1207 r1396 1 1 package schedframe.resources.computing.profiles.energy.airthroughput; 2 2 3 public enum StandardAir ThroughputStateName implements AirThroughputStateName{3 public enum StandardAirflowStateName implements AirflowStateName{ 4 4 5 5 ON, 6 6 OFF; 7 7 8 public String get Name() {8 public String getLabel() { 9 9 return toString(); 10 10 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/AirflowEstimationPlugin.java
r748 r1396 6 6 import schedframe.scheduling.manager.tasks.JobRegistry; 7 7 8 public interface Air ThroughputEstimationPlugin extends Plugin {8 public interface AirflowEstimationPlugin extends Plugin { 9 9 10 public double estimateAir Throughput(Event event, JobRegistry jobRegistry, ComputingResource resource);10 public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource); 11 11 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/plugin/DefaultAirflowEstimationPlugin.java
r770 r1396 7 7 import schedframe.scheduling.manager.tasks.JobRegistry; 8 8 9 public class DefaultAir ThroughputEstimationPlugin implements AirThroughputEstimationPlugin {9 public class DefaultAirflowEstimationPlugin implements AirflowEstimationPlugin { 10 10 11 11 @Override … … 28 28 29 29 @Override 30 public double estimateAir Throughput(Event event, JobRegistry jobRegistry, ComputingResource resource) {30 public double estimateAirflow(Event event, JobRegistry jobRegistry, ComputingResource resource) { 31 31 throw new RuntimeException("This interface is depracated. For air throughput estimation please use the estimateAirThroughput method form EnergyEstimationPlugin interface."); 32 32 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/AirflowInterface.java
r1380 r1396 4 4 5 5 import schedframe.Parameters; 6 import schedframe.resources.computing.profiles.energy.airthroughput.Air FlowValue;7 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputState;8 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputStateName;6 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 7 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 8 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 9 9 10 public interface Air ThroughputInterface {10 public interface AirflowInterface { 11 11 12 public Air ThroughputStateName getAirThroughputState();12 public AirflowStateName getAirflowState(); 13 13 14 public boolean setAir ThroughputState(AirThroughputStateName airThroughputState);14 public boolean setAirflowState(AirflowStateName airflowState); 15 15 16 public boolean supportAir ThroughputState(AirThroughputStateName powerState);16 public boolean supportAirflowState(AirflowStateName powerState); 17 17 18 public List<Air ThroughputState> getSupportedAirThroughputStates();18 public List<AirflowState> getSupportedAirflowStates(); 19 19 20 public double getAir Flow(AirThroughputStateName state) throws NoSuchFieldException;20 public double getAirflow(AirflowStateName state) throws NoSuchFieldException; 21 21 22 public double getPowerConsumption(Air ThroughputStateName state) throws NoSuchFieldException;22 public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException; 23 23 24 public Air FlowValue getRecentAirFlow();24 public AirflowValue getRecentAirflow(); 25 25 26 List<Air FlowValue> getAirFlowHistory();26 List<AirflowValue> getAirflowHistory(); 27 27 28 28 public Parameters getParameters(); -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/airthroughput/ui/ComputingResourceAirflowInterface.java
r1380 r1396 10 10 import schedframe.resources.computing.profiles.energy.EnergyEvent; 11 11 import schedframe.resources.computing.profiles.energy.EnergyEventType; 12 import schedframe.resources.computing.profiles.energy.airthroughput.Air FlowValue;13 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputProfile;14 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputState;15 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputStateName;16 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAir ThroughputStateName;12 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 13 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 14 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 15 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 16 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 17 17 18 public class ComputingResourceAir ThroughputInterface implements AirThroughputInterface{18 public class ComputingResourceAirflowInterface implements AirflowInterface{ 19 19 20 protected Air ThroughputStateName currentAirThroughputState;21 protected Air ThroughputProfile airThroughputProfile;20 protected AirflowStateName currentAirflowState; 21 protected AirflowProfile airflowProfile; 22 22 protected ComputingResource resource; 23 23 24 public ComputingResourceAir ThroughputInterface(ComputingResource resource, AirThroughputProfile airThroughputProfile){24 public ComputingResourceAirflowInterface(ComputingResource resource, AirflowProfile airflowProfile){ 25 25 this.resource = resource; 26 this.air ThroughputProfile = airThroughputProfile;27 this.currentAir ThroughputState = StandardAirThroughputStateName.ON;26 this.airflowProfile = airflowProfile; 27 this.currentAirflowState = StandardAirflowStateName.ON; 28 28 } 29 29 30 public Air ThroughputStateName getAirThroughputState() {31 return currentAir ThroughputState;30 public AirflowStateName getAirflowState() { 31 return currentAirflowState; 32 32 } 33 33 34 public boolean setAir ThroughputState(AirThroughputStateName state) {35 if(supportAir ThroughputState(state)){36 currentAir ThroughputState = state;34 public boolean setAirflowState(AirflowStateName state) { 35 if(supportAirflowState(state)){ 36 currentAirflowState = state; 37 37 38 38 //TO DO - notifications should be called for all resources starting form the lowest layer … … 44 44 } 45 45 46 public boolean supportAir ThroughputState(AirThroughputStateName state) {47 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){48 if(air FlowState.getName().equals(state.getName())){46 public boolean supportAirflowState(AirflowStateName state) { 47 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 48 if(airflowState.getName().equals(state.getLabel())){ 49 49 return true; 50 50 } … … 53 53 } 54 54 55 public List<Air ThroughputState> getSupportedAirThroughputStates() {56 List<Air ThroughputState> airThroughputStates = new ArrayList<AirThroughputState>();57 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){58 air ThroughputStates.add(airFlowState);55 public List<AirflowState> getSupportedAirflowStates() { 56 List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 57 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 58 airflowStates.add(airflowState); 59 59 } 60 return air ThroughputStates;60 return airflowStates; 61 61 } 62 62 63 public double getAir Flow(AirThroughputStateName state) throws NoSuchFieldException {64 double air Throughput= 0;65 if(supportAir ThroughputState(state)){66 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){67 if(air FlowState.getName().equals(state.getName())){68 air Throughput = airFlowState.getValue();63 public double getAirflow(AirflowStateName state) throws NoSuchFieldException { 64 double airflow = 0; 65 if(supportAirflowState(state)){ 66 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 67 if(airflowState.getName().equals(state.getLabel())){ 68 airflow = airflowState.getValue(); 69 69 break; 70 70 } 71 71 } 72 72 } 73 return air Throughput;73 return airflow; 74 74 } 75 75 76 public double getPowerConsumption(Air ThroughputStateName state) throws NoSuchFieldException {76 public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException { 77 77 double powerConsumption = 0; 78 if(supportAir ThroughputState(state)){79 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){80 if(air FlowState.getName().equals(state.getName())){81 powerConsumption = air FlowState.getPowerUsage();78 if(supportAirflowState(state)){ 79 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 80 if(airflowState.getName().equals(state.getLabel())){ 81 powerConsumption = airflowState.getPowerUsage(); 82 82 break; 83 83 } … … 87 87 } 88 88 89 public Air FlowValue getRecentAirFlow() {90 Air FlowValue airFlow = null;91 int lastIdx = getAir FlowHistory().size() - 1;89 public AirflowValue getRecentAirflow() { 90 AirflowValue airflow = null; 91 int lastIdx = getAirflowHistory().size() - 1; 92 92 if(lastIdx >= 0) 93 air Flow = getAirFlowHistory().get(lastIdx);93 airflow = getAirflowHistory().get(lastIdx); 94 94 else { 95 95 try { 96 air Flow = new AirFlowValue(DateTimeUtils.currentTimeMillis(), getAirFlow(currentAirThroughputState));96 airflow = new AirflowValue(DateTimeUtils.currentTimeMillis(), getAirflow(currentAirflowState)); 97 97 } catch (NoSuchFieldException e) { 98 98 } 99 99 } 100 return air Flow;100 return airflow; 101 101 } 102 102 103 public List<Air FlowValue> getAirFlowHistory(){104 return air ThroughputProfile.getAirThroughputHistory();103 public List<AirflowValue> getAirflowHistory(){ 104 return airflowProfile.getAirflowHistory(); 105 105 } 106 106 107 107 108 108 public Parameters getParameters() { 109 return air ThroughputProfile.getParameters();109 return airflowProfile.getParameters(); 110 110 } 111 111 -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/CustomPowerStateName.java
r477 r1396 1 1 package schedframe.resources.computing.profiles.energy.power; 2 2 3 public class UserPowerStateName implements PowerStateName {3 public class CustomPowerStateName implements PowerStateName { 4 4 5 5 protected String name; 6 6 7 public UserPowerStateName(String name) {7 public CustomPowerStateName(String name) { 8 8 this.name = name; 9 9 } 10 10 11 public String get Name() {11 public String getLabel() { 12 12 return name; 13 13 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateName.java
r477 r1396 3 3 public interface PowerStateName { 4 4 5 public String get Name();5 public String getLabel(); 6 6 7 7 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/PowerStateNameFactory.java
r477 r1396 6 6 public static PowerStateName createPowerStateName (String powerStateName){ 7 7 8 if(powerStateName.equals(StandardPowerStateName.ON.get Name()))8 if(powerStateName.equals(StandardPowerStateName.ON.getLabel())) 9 9 return StandardPowerStateName.ON; 10 10 11 else if(powerStateName.equals(StandardPowerStateName.OFF.get Name()))11 else if(powerStateName.equals(StandardPowerStateName.OFF.getLabel())) 12 12 return StandardPowerStateName.OFF; 13 13 14 else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.get Name()))14 else if(powerStateName.equals(StandardPowerStateName.HIBERNATE.getLabel())) 15 15 return StandardPowerStateName.HIBERNATE; 16 16 17 else if(powerStateName.equals(StandardPowerStateName.SLEEP.get Name()))17 else if(powerStateName.equals(StandardPowerStateName.SLEEP.getLabel())) 18 18 return StandardPowerStateName.SLEEP; 19 19 20 else if(powerStateName.equals(StandardPowerStateName.SUSPEND.get Name()))20 else if(powerStateName.equals(StandardPowerStateName.SUSPEND.getLabel())) 21 21 return StandardPowerStateName.SUSPEND; 22 22 23 else return new UserPowerStateName(powerStateName);23 else return new CustomPowerStateName(powerStateName); 24 24 } 25 25 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/StandardPowerStateName.java
r477 r1396 10 10 HIBERNATE; 11 11 12 public String get Name() {12 public String getLabel() { 13 13 return toString(); 14 14 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/plugin/EnergyEstimationPlugin.java
r1207 r1396 10 10 public double estimatePowerConsumption(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 11 11 12 public double estimateAir Throughput(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource);12 public double estimateAirflow(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); 13 13 14 14 public double estimateTemperature(EnergyEvent event, JobRegistry jobRegistry, PhysicalResource resource); -
DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/power/ui/ComputingResourcePowerInterface.java
r1374 r1396 74 74 public boolean supportPowerState(PowerStateName state) { 75 75 for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 76 if(powerState.getName().get Name().equals(state.getName())){76 if(powerState.getName().getLabel().equals(state.getLabel())){ 77 77 return true; 78 78 } … … 86 86 if(supportPowerState(state)){ 87 87 for(PowerState powerState: powerProfile.getSupportedPowerStates()){ 88 if(powerState.getName().get Name().equals(state.getName())){88 if(powerState.getName().getLabel().equals(state.getLabel())){ 89 89 powerConsumption = powerState.getPowerUsage(); 90 90 break; -
DCWoRMS/branches/coolemall/src/schedframe/resources/devices/Device.java
r1207 r1396 25 25 this.extensionList = new ExtensionListImpl(1); 26 26 initCharacteristics(devDesc); 27 accept(new EnergyExtension.Builder().resource(this).powerProfile(devDesc.getPowerProfile()).air FlowProfile(devDesc.getAirThroughputProfile()).thermalProfile(devDesc.getThermalProfile()).build());27 accept(new EnergyExtension.Builder().resource(this).powerProfile(devDesc.getPowerProfile()).airflowProfile(devDesc.getAirflowProfile()).thermalProfile(devDesc.getThermalProfile()).build()); 28 28 } 29 29 -
DCWoRMS/branches/coolemall/src/schedframe/resources/devices/DeviceAirflowInterface.java
r1380 r1396 9 9 import schedframe.resources.computing.profiles.energy.EnergyEvent; 10 10 import schedframe.resources.computing.profiles.energy.EnergyEventType; 11 import schedframe.resources.computing.profiles.energy.airthroughput.Air FlowValue;12 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputProfile;13 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputState;14 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputStateName;15 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAir ThroughputStateName;16 import schedframe.resources.computing.profiles.energy.airthroughput.ui.Air ThroughputInterface;11 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 12 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 13 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 14 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateName; 15 import schedframe.resources.computing.profiles.energy.airthroughput.StandardAirflowStateName; 16 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 17 17 18 public class DeviceAir ThroughputInterface implements AirThroughputInterface{18 public class DeviceAirflowInterface implements AirflowInterface{ 19 19 20 protected Air ThroughputStateName currentAirThroughputState;21 protected Air ThroughputProfile airThroughputProfile;20 protected AirflowStateName currentAirflowState; 21 protected AirflowProfile airflowProfile; 22 22 protected PhysicalResource resource; 23 23 24 public DeviceAir ThroughputInterface(PhysicalResource resource, AirThroughputProfile airThroughputProfile){24 public DeviceAirflowInterface(PhysicalResource resource, AirflowProfile airflowProfile){ 25 25 this.resource = resource; 26 this.air ThroughputProfile = airThroughputProfile;27 this.currentAir ThroughputState = StandardAirThroughputStateName.ON;26 this.airflowProfile = airflowProfile; 27 this.currentAirflowState = StandardAirflowStateName.ON; 28 28 } 29 29 30 public Air ThroughputStateName getAirThroughputState() {31 return currentAir ThroughputState;30 public AirflowStateName getAirflowState() { 31 return currentAirflowState; 32 32 } 33 33 34 public boolean setAir ThroughputState(AirThroughputStateName state) {35 if(supportAir ThroughputState(state)){36 currentAir ThroughputState = state;34 public boolean setAirflowState(AirflowStateName state) { 35 if(supportAirflowState(state)){ 36 currentAirflowState = state; 37 37 38 38 //TO DO - notifications should be called for all resources starting form the lowest layer … … 44 44 } 45 45 46 public boolean supportAir ThroughputState(AirThroughputStateName state) {47 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){48 if(air FlowState.getName().equals(state.getName())){46 public boolean supportAirflowState(AirflowStateName state) { 47 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 48 if(airflowState.getName().getLabel().equals(state.getLabel())){ 49 49 return true; 50 50 } … … 53 53 } 54 54 55 public List<Air ThroughputState> getSupportedAirThroughputStates(){56 List<Air ThroughputState> airThroughputStates = new ArrayList<AirThroughputState>();57 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){58 air ThroughputStates.add(airFlowState);55 public List<AirflowState> getSupportedAirflowStates(){ 56 List<AirflowState> airflowStates = new ArrayList<AirflowState>(); 57 for(AirflowState airFlowState: airflowProfile.getAirflowStates()){ 58 airflowStates.add(airFlowState); 59 59 } 60 return air ThroughputStates;60 return airflowStates; 61 61 } 62 62 63 public double getAir Flow(AirThroughputStateName state) throws NoSuchFieldException {64 double air Throughput= 0;65 if(supportAir ThroughputState(state)){66 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){67 if(air FlowState.getName().equals(state.getName())){68 air Throughput = airFlowState.getValue();63 public double getAirflow(AirflowStateName state) throws NoSuchFieldException { 64 double airflow = 0; 65 if(supportAirflowState(state)){ 66 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 67 if(airflowState.getName().getLabel().equals(state.getLabel())){ 68 airflow = airflowState.getValue(); 69 69 break; 70 70 } 71 71 } 72 72 } 73 return air Throughput;73 return airflow; 74 74 } 75 75 76 public double getPowerConsumption(Air ThroughputStateName state) throws NoSuchFieldException {76 public double getPowerConsumption(AirflowStateName state) throws NoSuchFieldException { 77 77 double powerConsumption = 0; 78 if(supportAir ThroughputState(state)){79 for(Air ThroughputState airFlowState: airThroughputProfile.getAirThroughputStates()){80 if(air FlowState.getName().equals(state.getName())){81 powerConsumption = air FlowState.getPowerUsage();78 if(supportAirflowState(state)){ 79 for(AirflowState airflowState: airflowProfile.getAirflowStates()){ 80 if(airflowState.getName().getLabel().equals(state.getLabel())){ 81 powerConsumption = airflowState.getPowerUsage(); 82 82 break; 83 83 } … … 87 87 } 88 88 89 public Air FlowValue getRecentAirFlow() {90 Air FlowValue airFlow = null;91 int lastIdx = getAir FlowHistory().size() - 1;89 public AirflowValue getRecentAirflow() { 90 AirflowValue airflow = null; 91 int lastIdx = getAirflowHistory().size() - 1; 92 92 if(lastIdx >= 0) 93 air Flow = getAirFlowHistory().get(lastIdx);93 airflow = getAirflowHistory().get(lastIdx); 94 94 else { 95 95 try { 96 air Flow = new AirFlowValue(DateTimeUtils.currentTimeMillis(), getAirFlow(currentAirThroughputState));96 airflow = new AirflowValue(DateTimeUtils.currentTimeMillis(), getAirflow(currentAirflowState)); 97 97 } catch (NoSuchFieldException e) { 98 98 } 99 99 } 100 return air Flow;100 return airflow; 101 101 } 102 102 103 public List<Air FlowValue> getAirFlowHistory(){104 return air ThroughputProfile.getAirThroughputHistory();103 public List<AirflowValue> getAirflowHistory(){ 104 return airflowProfile.getAirflowHistory(); 105 105 } 106 106 107 107 public Parameters getParameters() { 108 return air ThroughputProfile.getParameters();108 return airflowProfile.getParameters(); 109 109 } 110 110 -
DCWoRMS/branches/coolemall/src/schedframe/resources/devices/PhysicalResource.java
r1287 r1396 12 12 import schedframe.resources.computing.extensions.ExtensionType; 13 13 import schedframe.resources.computing.profiles.energy.EnergyExtension; 14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.Air ThroughputInterface;14 import schedframe.resources.computing.profiles.energy.airthroughput.ui.AirflowInterface; 15 15 import schedframe.resources.computing.profiles.energy.power.ui.PowerInterface; 16 16 import schedframe.resources.computing.profiles.energy.thermal.ui.ThermalInterface; … … 70 70 } 71 71 72 public Air ThroughputInterface getAirThroughputInterface(){72 public AirflowInterface getAirflowInterface(){ 73 73 Extension extension = getExtension(ExtensionType.ENERGY_EXTENSION); 74 74 if(extension != null){ 75 75 EnergyExtension ee = (EnergyExtension)extension; 76 return ee.getAir ThroughputInterface();76 return ee.getAirflowInterface(); 77 77 } 78 78 return null; -
DCWoRMS/branches/coolemall/src/schedframe/resources/devices/coolemall/FanAirflowInterface.java
r1317 r1396 1 1 package schedframe.resources.devices.coolemall; 2 2 3 import schedframe.resources.computing.profiles.energy.airthroughput.Air ThroughputProfile;4 import schedframe.resources.computing.profiles.energy.airthroughput. UserAirThroughputStateName;3 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 4 import schedframe.resources.computing.profiles.energy.airthroughput.CustomAirflowStateName; 5 5 import schedframe.resources.devices.PhysicalResource; 6 import schedframe.resources.devices.DeviceAir ThroughputInterface;6 import schedframe.resources.devices.DeviceAirflowInterface; 7 7 8 public class FanAir ThroughputInterface extends DeviceAirThroughputInterface {8 public class FanAirflowInterface extends DeviceAirflowInterface { 9 9 10 public FanAir ThroughputInterface(PhysicalResource resource, AirThroughputProfile airThroughputProfile) {11 super(resource, air ThroughputProfile);12 this.currentAir ThroughputState = new UserAirThroughputStateName("2");10 public FanAirflowInterface(PhysicalResource resource, AirflowProfile airflowProfile) { 11 super(resource, airflowProfile); 12 this.currentAirflowState = new CustomAirflowStateName("2"); 13 13 } 14 14 15 15 public boolean turnOn(){ 16 return setAir ThroughputState(new UserAirThroughputStateName("2"));16 return setAirflowState(new CustomAirflowStateName("2")); 17 17 } 18 18 19 19 public boolean turnOff(){ 20 return setAir ThroughputState(new UserAirThroughputStateName("1"));20 return setAirflowState(new CustomAirflowStateName("1")); 21 21 } 22 22 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/devices/description/PhysicalResourceDescription.java
r1317 r1396 10 10 import schedframe.resources.computing.description.ResourceDescription; 11 11 import schedframe.resources.computing.location.Location; 12 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputProfile; 13 import schedframe.resources.computing.profiles.energy.airthroughput.AirThroughputState; 14 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirThroughputEstimationPlugin; 15 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.DefaultAirThroughputEstimationPlugin; 12 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowStateNameFactory; 13 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowProfile; 14 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowState; 15 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.AirflowEstimationPlugin; 16 import schedframe.resources.computing.profiles.energy.airthroughput.plugin.DefaultAirflowEstimationPlugin; 16 17 import schedframe.resources.computing.profiles.energy.power.PState; 17 18 import schedframe.resources.computing.profiles.energy.power.PowerProfile; … … 36 37 37 38 protected PowerProfile powerProfile; 38 protected Air ThroughputProfile airThroughputProfile;39 protected AirflowProfile airflowProfile; 39 40 protected ThermalProfile thermalProfile; 40 41 protected LoadProfile loadProfile; … … 58 59 if (profile != null) { 59 60 initPowerProfile(profile.getPowerProfile()); 60 initAir ThroughputProfile(profile.getAirThroughputProfile());61 initAirflowProfile(profile.getAirThroughputProfile()); 61 62 initThermalProfile(profile.getThermalProfile()); 62 63 initLoadProfile(profile.getLoadProfile()); … … 151 152 } 152 153 153 protected void initAir ThroughputProfile(schemas.AirThroughputProfile airThroughputProfile) {154 if (air ThroughputProfile != null) {155 156 Air ThroughputEstimationPlugin airThroughputEstimationPlugin = null;157 List<Air ThroughputState> airThroughputStates = null;158 if(air ThroughputProfile.getAirThroughputEstimationPlugin() != null){159 String air ThroughputEstimationPluginName = airThroughputProfile.getAirThroughputEstimationPlugin().getName();160 if(air ThroughputEstimationPluginName != null) {161 air ThroughputEstimationPlugin = (AirThroughputEstimationPlugin) InstanceFactory.createInstance(162 air ThroughputEstimationPluginName, AirThroughputEstimationPlugin.class);154 protected void initAirflowProfile(schemas.AirThroughputProfile airflowProfile) { 155 if (airflowProfile != null) { 156 157 AirflowEstimationPlugin airflowEstimationPlugin = null; 158 List<AirflowState> airflowStates = null; 159 if(airflowProfile.getAirThroughputEstimationPlugin() != null){ 160 String airflowEstimationPluginName = airflowProfile.getAirThroughputEstimationPlugin().getName(); 161 if(airflowEstimationPluginName != null) { 162 airflowEstimationPlugin = (AirflowEstimationPlugin) InstanceFactory.createInstance( 163 airflowEstimationPluginName, AirflowEstimationPlugin.class); 163 164 } else { 164 air ThroughputEstimationPlugin = new DefaultAirThroughputEstimationPlugin();165 } 166 Parameters params = extractParameters(air ThroughputProfile.getAirThroughputEstimationPlugin().getParameter());167 air ThroughputEstimationPlugin.init(params);168 } 169 if(air ThroughputProfile.getAirThroughputStates() != null){170 air ThroughputStates = new ArrayList<AirThroughputState>();171 int air ThrouhputStateCount = airThroughputProfile.getAirThroughputStates().getAirThroughputStateCount();172 for (int i = 0; i < air ThrouhputStateCount; i++) {173 schemas.AirThroughputState ats = air ThroughputProfile.getAirThroughputStates().getAirThroughputState(i);174 Air ThroughputState airThroughputState = new AirThroughputState(ats.getName(), ats.getValue()165 airflowEstimationPlugin = new DefaultAirflowEstimationPlugin(); 166 } 167 Parameters params = extractParameters(airflowProfile.getAirThroughputEstimationPlugin().getParameter()); 168 airflowEstimationPlugin.init(params); 169 } 170 if(airflowProfile.getAirThroughputStates() != null){ 171 airflowStates = new ArrayList<AirflowState>(); 172 int airflowStateCount = airflowProfile.getAirThroughputStates().getAirThroughputStateCount(); 173 for (int i = 0; i < airflowStateCount; i++) { 174 schemas.AirThroughputState ats = airflowProfile.getAirThroughputStates().getAirThroughputState(i); 175 AirflowState airflowState = new AirflowState(AirflowStateNameFactory.createAirflowStateName(ats.getName()), ats.getValue() 175 176 .getContent(), ats.getPowerUsage().getContent()); 176 177 Parameters params = extractParameters(ats.getParameter()); 177 air ThroughputState.init(params);178 air ThroughputStates.add(airThroughputState);179 } 180 } 181 this.air ThroughputProfile = new AirThroughputProfile(airThroughputEstimationPlugin, airThroughputStates);182 Parameters params = extractParameters(air ThroughputProfile.getParameter());183 this.air ThroughputProfile.init(params);178 airflowState.init(params); 179 airflowStates.add(airflowState); 180 } 181 } 182 this.airflowProfile = new AirflowProfile(airflowEstimationPlugin, airflowStates); 183 Parameters params = extractParameters(airflowProfile.getParameter()); 184 this.airflowProfile.init(params); 184 185 } 185 186 } … … 281 282 } 282 283 283 public Air ThroughputProfile getAirThroughputProfile() {284 return air ThroughputProfile;284 public AirflowProfile getAirflowProfile() { 285 return airflowProfile; 285 286 } 286 287 -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/CustomResourceUnitName.java
r477 r1396 1 1 package schedframe.resources.units; 2 2 3 public class UserResourceUnitName implements ResourceUnitName {3 public class CustomResourceUnitName implements ResourceUnitName { 4 4 5 5 protected String name; 6 6 7 public UserResourceUnitName(String name) {7 public CustomResourceUnitName(String name) { 8 8 this.name = name; 9 9 } 10 10 11 public String get Name() {11 public String getLabel() { 12 12 return name; 13 13 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitFactory.java
r1384 r1396 18 18 19 19 public static ResourceUnit createUnit(String unitName, String resId, int totalAmount, int usedAmount){ 20 if(unitName.equalsIgnoreCase(StandardResourceUnitName.CPU.get Name()))20 if(unitName.equalsIgnoreCase(StandardResourceUnitName.CPU.getLabel())) 21 21 return new PEUnit(resId, totalAmount, usedAmount); 22 if(unitName.equalsIgnoreCase(StandardResourceUnitName.PE.get Name()))22 if(unitName.equalsIgnoreCase(StandardResourceUnitName.PE.getLabel())) 23 23 return new PEUnit(resId, totalAmount, usedAmount); 24 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.MEMORY.get Name()))24 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.MEMORY.getLabel())) 25 25 return new Memory(resId, totalAmount, usedAmount); 26 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.STORAGE.get Name()))26 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.STORAGE.getLabel())) 27 27 return new Storage(resId, totalAmount, usedAmount); 28 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.GPU.get Name()))28 else if(unitName.equalsIgnoreCase(StandardResourceUnitName.GPU.getLabel())) 29 29 return new GPU(resId, totalAmount, usedAmount); 30 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.CPUSPEED.get Name()))30 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.CPUSPEED.getLabel())) 31 31 return new CpuSpeed(resId, totalAmount, usedAmount); 32 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.COST.get Name()))32 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.COST.getLabel())) 33 33 return new Cost(resId, totalAmount); 34 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.APPLICATION.get Name()))34 else if (unitName.equalsIgnoreCase(StandardResourceUnitName.APPLICATION.getLabel())) 35 35 return new Applications(resId); 36 36 else -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitName.java
r477 r1396 3 3 public interface ResourceUnitName { 4 4 5 public String get Name();5 public String getLabel(); 6 6 7 7 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/ResourceUnitNameFactory.java
r477 r1396 6 6 public static ResourceUnitName createResourceUnitName(String unitName){ 7 7 8 if(unitName.equals(StandardResourceUnitName.MEMORY.get Name()))8 if(unitName.equals(StandardResourceUnitName.MEMORY.getLabel())) 9 9 return StandardResourceUnitName.MEMORY; 10 10 11 else if (unitName.equals(StandardResourceUnitName.STORAGE.get Name()))11 else if (unitName.equals(StandardResourceUnitName.STORAGE.getLabel())) 12 12 return StandardResourceUnitName.STORAGE; 13 13 14 else if (unitName.equals(StandardResourceUnitName.PE.get Name()))14 else if (unitName.equals(StandardResourceUnitName.PE.getLabel())) 15 15 return StandardResourceUnitName.PE; 16 16 17 else if (unitName.equals(StandardResourceUnitName.CPUSPEED.get Name()))17 else if (unitName.equals(StandardResourceUnitName.CPUSPEED.getLabel())) 18 18 return StandardResourceUnitName.CPUSPEED; 19 19 20 else if (unitName.equals(StandardResourceUnitName.GPU.get Name()))20 else if (unitName.equals(StandardResourceUnitName.GPU.getLabel())) 21 21 return StandardResourceUnitName.GPU; 22 22 23 else if (unitName.equals(StandardResourceUnitName.APPLICATION.get Name()))23 else if (unitName.equals(StandardResourceUnitName.APPLICATION.getLabel())) 24 24 return StandardResourceUnitName.APPLICATION; 25 25 26 else if (unitName.equals(StandardResourceUnitName.COST.get Name()))26 else if (unitName.equals(StandardResourceUnitName.COST.getLabel())) 27 27 return StandardResourceUnitName.COST; 28 28 29 else return new UserResourceUnitName(unitName);29 else return new CustomResourceUnitName(unitName); 30 30 } 31 31 } -
DCWoRMS/branches/coolemall/src/schedframe/resources/units/StandardResourceUnitName.java
r477 r1396 46 46 } 47 47 48 public String get Name(){48 public String getLabel(){ 49 49 return this.name; 50 50 } -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/GridResourceDiscovery.java
r493 r1396 20 20 import schedframe.resources.units.ResourceUnitName; 21 21 import schedframe.scheduling.manager.resources.ResourceManager; 22 import schedframe.scheduling.plugin. grid.ModuleType;22 import schedframe.scheduling.plugin.ModuleType; 23 23 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 24 24 import schedframe.scheduling.tasks.requirements.AbstractResourceRequirements; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/ResourceItem.java
r1362 r1396 2 2 3 3 import java.util.HashSet; 4 import java.util.LinkedList; 5 import java.util.List; 4 6 import java.util.Map; 5 7 import java.util.Set; 6 8 9 import schedframe.resources.computing.ComputingResource; 10 import schedframe.resources.units.ProcessingElements; 7 11 import schedframe.resources.units.ResourceUnit; 8 12 import schedframe.resources.units.ResourceUnitName; 13 import schedframe.resources.units.StandardResourceUnitName; 9 14 10 public class Resource HistoryItem {15 public class ResourceItem { 11 16 12 17 protected Map<ResourceUnitName, ResourceUnit> usedResources; 13 18 protected Set<String> visitedResources; 14 19 15 public Resource HistoryItem(Map<ResourceUnitName, ResourceUnit> usedResources){20 public ResourceItem(Map<ResourceUnitName, ResourceUnit> usedResources){ 16 21 this.usedResources = usedResources; 17 22 this.visitedResources = new HashSet<String>(); 23 saveResourceNames(); 18 24 } 19 25 … … 22 28 } 23 29 24 public void trackResource(String resName){ 25 visitedResources.add(resName); 26 } 27 28 public Set<String> getVisitedResources(){ 30 public Set<String> getResourceNames(){ 29 31 return visitedResources; 30 32 } 31 33 34 private void saveResourceNames(){ 35 ProcessingElements pes = (ProcessingElements) usedResources.get(StandardResourceUnitName.PE); 36 for (ComputingResource resource : pes) { 37 38 LinkedList<ComputingResource> toExamine = new LinkedList<ComputingResource>(); 39 toExamine.push(resource); 40 41 while (!toExamine.isEmpty()) { 42 ComputingResource compResource = toExamine.pop(); 43 List<ComputingResource> resources = compResource.getChildren(); 44 if(resources.isEmpty()){ 45 if(!visitedResources.contains(compResource.getFullName())){ 46 visitedResources.add(compResource.getFullName()); 47 } 48 } else { 49 for (int i = 0; i < resources.size(); i++) { 50 ComputingResource resourceChild = resources.get(i); 51 toExamine.addLast(resourceChild); 52 } 53 } 54 } 55 } 56 } 32 57 } -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/resources/LocalResourceManager.java
r1392 r1396 306 306 for(ResourceUnitName resUnitName: resources.keySet()){ 307 307 ResourceUnit resUnit = resources.get(resUnitName); 308 if(resUnit.getName().get Name().equals(StandardResourceUnitName.PE.getName())){308 if(resUnit.getName().getLabel().equals(StandardResourceUnitName.PE.getLabel())){ 309 309 ProcessingElements pe = (ProcessingElements)resUnit; 310 310 for(ComputingResource cr: pe){ -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/tasks/JobRegistryImpl.java
r1362 r1396 53 53 for (ExecTask task: executables) { 54 54 if (task.getStatus() == status) { 55 Set<String> visitedResource = task.getAllocatedResources().getLast().get VisitedResources();55 Set<String> visitedResource = task.getAllocatedResources().getLast().getResourceNames(); 56 56 for(String res: visitedResource){ 57 57 if(res.contains(context)){ -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/Module.java
r477 r1396 1 package schedframe.scheduling.plugin .grid;1 package schedframe.scheduling.plugin; 2 2 3 3 import java.util.Properties; 4 5 import eduni.simjava.Sim_event;6 4 7 5 import schedframe.exceptions.ModuleException; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleList.java
r477 r1396 1 package schedframe.scheduling.plugin .grid;1 package schedframe.scheduling.plugin; 2 2 3 3 import java.util.List; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleListImpl.java
r477 r1396 1 package schedframe.scheduling.plugin .grid;1 package schedframe.scheduling.plugin; 2 2 3 3 import java.util.ArrayList; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/ModuleType.java
r777 r1396 1 package schedframe.scheduling.plugin .grid;1 package schedframe.scheduling.plugin; 2 2 3 import schedframe.StaticResourceLoadCalendar; 3 4 import schedframe.scheduling.plugin.grid.ResourceDiscovery; 4 5 import test.EventManager; 5 6 … … 13 14 14 15 RESOURCE_DISCOVERY("Resource_discovery", ResourceDiscovery.class), 15 RESOURCE_CALENDAR("Resource calendar", StaticResourceLoadCalendar.class),16 16 EVENT_MANAGER("Event manager", EventManager.class); 17 17 //DATA_MANAGER("Data Manager", DataManager.class), -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/SchedulingPlugin.java
r516 r1396 7 7 import schedframe.scheduling.manager.tasks.JobRegistry; 8 8 import schedframe.scheduling.plan.SchedulingPlanInterface; 9 import schedframe.scheduling.plugin.grid.ModuleList;10 9 import schedframe.scheduling.queue.TaskQueueList; 11 10 -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/grid/ResourceDiscovery.java
r477 r1396 6 6 import schedframe.scheduling.SchedulerDescription; 7 7 import schedframe.scheduling.SecurityContext; 8 import schedframe.scheduling.plugin.Module; 8 9 import schedframe.scheduling.tasks.requirements.AbstractResourceRequirements; 9 10 -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/plugin/local/LocalSchedulingPlugin.java
r515 r1396 5 5 import schedframe.scheduling.manager.resources.ResourceManager; 6 6 import schedframe.scheduling.manager.tasks.JobRegistry; 7 import schedframe.scheduling.plugin.ModuleList; 7 8 import schedframe.scheduling.plugin.SchedulingPlugin; 8 import schedframe.scheduling.plugin.grid.ModuleList;9 9 import schedframe.scheduling.queue.TaskQueueList; 10 10 -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/AbstractManagementSystem.java
r1377 r1396 23 23 import schedframe.scheduling.plan.AllocationInterface; 24 24 import schedframe.scheduling.plan.SchedulingPlanInterface; 25 import schedframe.scheduling.plugin.ModuleList; 25 26 import schedframe.scheduling.plugin.SchedulingPlugin; 26 27 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin; 27 import schedframe.scheduling.plugin.grid.ModuleList;28 28 import schedframe.scheduling.manager.resources.ResourceAllocation; 29 29 import schedframe.scheduling.queue.TaskQueue; -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/global/GridBroker.java
r1385 r1396 12 12 import schedframe.scheduling.Scheduler; 13 13 import schedframe.scheduling.manager.resources.ManagedResources; 14 import schedframe.scheduling.plugin.ModuleListImpl; 14 15 import schedframe.scheduling.plugin.SchedulingPlugin; 15 16 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin; 16 import schedframe.scheduling.plugin.grid.ModuleListImpl;17 17 import schedframe.scheduling.queue.TaskQueueList; 18 18 -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/policy/local/LocalManagementSystem.java
r1392 r1396 4 4 import java.util.HashMap; 5 5 import java.util.Iterator; 6 import java.util.LinkedList;7 6 import java.util.List; 8 7 import java.util.Map; 9 import java.util.Set;10 8 11 9 import org.apache.commons.logging.Log; … … 33 31 import schedframe.resources.units.StandardResourceUnitName; 34 32 import schedframe.scheduling.ExecutionHistoryItem; 35 import schedframe.scheduling.Resource HistoryItem;33 import schedframe.scheduling.ResourceItem; 36 34 import schedframe.scheduling.Scheduler; 37 35 import schedframe.scheduling.TaskList; … … 44 42 import schedframe.scheduling.plan.ScheduledTaskInterface; 45 43 import schedframe.scheduling.plan.SchedulingPlanInterface; 44 import schedframe.scheduling.plugin.ModuleListImpl; 46 45 import schedframe.scheduling.plugin.SchedulingPlugin; 47 46 import schedframe.scheduling.plugin.estimation.ExecutionTimeEstimationPlugin; 48 import schedframe.scheduling.plugin.grid.ModuleListImpl;49 47 import schedframe.scheduling.policy.AbstractManagementSystem; 50 48 import schedframe.scheduling.queue.TaskQueueList; … … 56 54 import schedframe.scheduling.tasks.WorkloadUnit; 57 55 import simulator.DCWormsConstants; 58 import simulator.stats. GSSAccumulator;56 import simulator.stats.DCwormsAccumulator; 59 57 import simulator.utils.DoubleMath; 60 58 import dcworms.schedframe.scheduling.ExecTask; … … 382 380 383 381 saveExecutionHistory(exec, exec.getCompletionPercentage(), phaseDuration); 384 if(exec.get ResourceConsumptionProfile().isLast()){382 if(exec.getExecutionProfile().isLast()){ 385 383 scheduler.sendInternal(phaseDuration, DCWormsTags.TASK_EXECUTION_FINISHED, execTask);; 386 384 } else { … … 451 449 ExecTask task = iter.next(); 452 450 Executable exec = (Executable)task; 453 ExecutionHistoryItem execHistItem = exec.getExec History().getLast();451 ExecutionHistoryItem execHistItem = exec.getExecutionHistory().getLast(); 454 452 //System.out.println("--- upadteProgressX: " + Sim_system.sim_clock() ); 455 453 //System.out.println("taskId: " + exec.getId() + "; completion percentage: " + exec.getCompletionPercentage() + "; timespan: " + timeSpan + "; estimatedDuration: " + execHistItem.getCompletionPercentage()); … … 496 494 execTask, choosenResources, exec.getCompletionPercentage())).intValue(); 497 495 498 ExecutionHistoryItem execHistItem = exec.getExec History().getLast();496 ExecutionHistoryItem execHistItem = exec.getExecutionHistory().getLast(); 499 497 double lastTimeStamp = execHistItem.getTimeStamp().getMillis()/1000; 500 498 if(DoubleMath.subtract((lastTimeStamp + execHistItem.getEstimatedDuration()), (new DateTime().getMillis()/1000 + phaseDuration)) == 0.0){ … … 508 506 saveExecutionHistory(exec, exec.getCompletionPercentage(), phaseDuration); 509 507 510 if(exec.get ResourceConsumptionProfile().isLast()){508 if(exec.getExecutionProfile().isLast()){ 511 509 ExecTaskFilter filter = new ExecTaskFilter(exec.getUniqueId(), DCWormsTags.TASK_EXECUTION_FINISHED); 512 510 scheduler.sim_cancel(filter, null); … … 542 540 saveExecutionHistory(exec, exec.getCompletionPercentage(), phaseDuration); 543 541 544 if(exec.get ResourceConsumptionProfile().isLast()){542 if(exec.getExecutionProfile().isLast()){ 545 543 scheduler.sendInternal(phaseDuration, DCWormsTags.TASK_EXECUTION_FINISHED, execTask); 546 544 } else { … … 555 553 public double calculateTotalLoad() { 556 554 557 GSSAccumulator loadAcc = new GSSAccumulator();555 DCwormsAccumulator loadAcc = new DCwormsAccumulator(); 558 556 try { 559 557 for(ComputingResource compRes: getResourceManager().getResourcesOfType(StandardResourceType.Node)){ … … 718 716 boolean allocationStatus = getAllocationManager().allocateResources(choosenResources, exclusive); 719 717 if(allocationStatus){ 720 Resource HistoryItem resourceHistoryItem = new ResourceHistoryItem(choosenResources);718 ResourceItem resourceHistoryItem = new ResourceItem(choosenResources); 721 719 exec.addAllocatedResources(resourceHistoryItem); 722 saveResourceHistory(exec);723 720 return true; 724 721 } … … 726 723 } 727 724 728 private void saveResourceHistory(Executable exec){ 729 ProcessingElements pes = (ProcessingElements) exec.getAllocatedResources().getLast().getResourceUnits().get(StandardResourceUnitName.PE); 730 for (ComputingResource resource : pes) { 731 732 LinkedList<ComputingResource> toExamine = new LinkedList<ComputingResource>(); 733 toExamine.push(resource); 734 735 while (!toExamine.isEmpty()) { 736 ComputingResource compResource = toExamine.pop(); 737 List<ComputingResource> resources = compResource.getChildren(); 738 if(resources.isEmpty()){ 739 Set<String> visitedResources = exec.getAllocatedResources().getLast().getVisitedResources(); 740 if(!visitedResources.contains(compResource.getFullName())){ 741 exec.getAllocatedResources().getLast().trackResource(compResource.getFullName()); 742 } 743 } else { 744 for (int i = 0; i < resources.size(); i++) { 745 ComputingResource resourceChild = resources.get(i); 746 toExamine.addLast(resourceChild); 747 } 748 } 749 } 750 } 751 } 725 752 726 753 727 } -
DCWoRMS/branches/coolemall/src/schedframe/scheduling/tasks/Job.java
r1374 r1396 1 1 package schedframe.scheduling.tasks; 2 3 4 import org.qcg.broker.schemas.resreqs.ParentType;5 import org.qcg.broker.schemas.resreqs.ResourceRequirements;6 import org.qcg.broker.schemas.resreqs.Workflow;7 import org.qcg.broker.schemas.resreqs.types.TaskStatesName;8 2 9 3 … … 15 9 16 10 import org.joda.time.DateTime; 11 import org.qcg.broker.schemas.resreqs.ResourceRequirements; 17 12 18 13 import qcg.shared.constants.BrokerConstants; 19 20 14 import schedframe.scheduling.WorkloadUnitHandler; 21 15 import schedframe.scheduling.manager.tasks.JobRegistryImpl; … … 210 204 } 211 205 212 private List<Task> getReadyTasks() throws NoSuchFieldException{213 214 List<Task> availableTasks = new ArrayList<Task>();215 int size = tasks.size();216 217 for(int i = 0; i < size; i++){218 int parCnt;219 int previousTaskSucceedCnt = 0;220 Task task = tasks.get(i);221 if(task.getStatus() != (int)BrokerConstants.TASK_STATUS_UNSUBMITTED)222 continue;223 //the following procedure supports only one nested structure224 Workflow w = task.getDescription().getWorkflow();225 if (w == null){226 availableTasks.add(task);227 continue;228 }229 if(w.getAnd() != null) {230 parCnt = w.getAnd().getParentOpTypeItemCount();231 if(parCnt == 0){232 availableTasks.add(task);233 }else234 {235 for(int j = 0; j < parCnt; j++){236 ParentType par = w.getAnd().getParentOpTypeItem(j).getParent();237 if(par.getTriggerState().compareTo(TaskStatesName.FINISHED) == 0){238 if(!getTask(par.getContent()).isFinished()){239 break;240 }241 }242 previousTaskSucceedCnt++;243 }244 245 if(previousTaskSucceedCnt == parCnt)246 availableTasks.add(task);247 }248 }249 else if(w.getOr() != null) {250 parCnt = w.getOr().getParentOpTypeItemCount();251 if(parCnt == 0){252 availableTasks.add(task);253 }254 else{255 for(int j = 0; j < parCnt; j++){256 ParentType par = w.getOr().getParentOpTypeItem(j).getParent();257 if(par.getTriggerState().compareTo(TaskStatesName.FINISHED) == 0){258 if(!getTask(par.getContent()).isFinished()){259 continue;260 }261 }262 previousTaskSucceedCnt++;263 }264 265 if(previousTaskSucceedCnt > 0)266 availableTasks.add(task);267 }268 }269 else {270 parCnt = w.getParentCount();271 if(parCnt == 0){272 availableTasks.add(task);273 }else{274 for(int j = 0; j < parCnt; j++){275 ParentType par = w.getParent(j);276 if(par.getTriggerState().compareTo(TaskStatesName.FINISHED) == 0){277 if(!getTask(par.getContent()).isFinished()){278 continue;279 }280 }281 previousTaskSucceedCnt++;282 }283 284 if(previousTaskSucceedCnt == parCnt)285 availableTasks.add(task);286 }287 }288 }289 return availableTasks;290 }291 292 206 } -
DCWoRMS/branches/coolemall/src/simulator/ConfigurationOptions.java
r1299 r1396 187 187 188 188 public String [] resForEnergyChart; 189 public String [] resForAir FlowChart;189 public String [] resForAirflowChart; 190 190 public String [] resForTemperatureChart; 191 191 public String [] resForUtilizationChart; … … 195 195 public double inletRoomAirTempeature; 196 196 public double ambientAirTempeature; 197 public double air FlowVolume;197 public double airflowVolume; 198 198 public double alpha; 199 199 … … 334 334 335 335 try { 336 co.resForAir FlowChart = bundle.getString(CREATEDIAGRAMS_AIRFLOW).split(";");337 if(co.resForAir FlowChart.length > 0){336 co.resForAirflowChart = bundle.getString(CREATEDIAGRAMS_AIRFLOW).split(";"); 337 if(co.resForAirflowChart.length > 0){ 338 338 co.creatediagrams_resairflow = true; 339 339 } … … 416 416 417 417 try { 418 co.air FlowVolume = Double.valueOf(bundle.getString(AIR_FLOW_VOLUME)).doubleValue();419 } catch(MissingResourceException e){ 420 co.air FlowVolume = -1;418 co.airflowVolume = Double.valueOf(bundle.getString(AIR_FLOW_VOLUME)).doubleValue(); 419 } catch(MissingResourceException e){ 420 co.airflowVolume = -1; 421 421 } 422 422 … … 427 427 } 428 428 429 ConfigurationOptions.coolingData = new CoolingModelData(co.pressureDrop, co.outletRoomAirTempeature, co.inletRoomAirTempeature, co.ambientAirTempeature, co.air FlowVolume, co.alpha);429 ConfigurationOptions.coolingData = new CoolingModelData(co.pressureDrop, co.outletRoomAirTempeature, co.inletRoomAirTempeature, co.ambientAirTempeature, co.airflowVolume, co.alpha); 430 430 return co; 431 431 } -
DCWoRMS/branches/coolemall/src/simulator/reader/ResourceReader.java
r1374 r1396 26 26 import schedframe.Parameters; 27 27 import schedframe.SimulatedEnvironment; 28 import schedframe.exceptions.ResourceException;29 28 import schedframe.resources.CoolEmAllResourceFactory; 30 29 import schedframe.resources.Resource; -
DCWoRMS/branches/coolemall/src/simulator/stats/AbstractMetricsCalculator.java
r1299 r1396 13 13 protected static final double SEC_IN_HOUR = 3600; 14 14 15 protected Map<String, List< GSSAccumulator>> metricsData = new HashMap<String, List<GSSAccumulator>>();15 protected Map<String, List<DCwormsAccumulator>> metricsData = new HashMap<String, List<DCwormsAccumulator>>(); 16 16 17 17 protected long startTime; … … 28 28 abstract public List<MetricsStats> calulateMetrics(); 29 29 30 public void addMetricsData(String resourceTypeName, GSSAccumulator resourceEnergyAccumulator){31 List< GSSAccumulator> resourceEnergyAccumulatorList = metricsData.get(resourceTypeName);30 public void addMetricsData(String resourceTypeName, DCwormsAccumulator resourceEnergyAccumulator){ 31 List<DCwormsAccumulator> resourceEnergyAccumulatorList = metricsData.get(resourceTypeName); 32 32 if(resourceEnergyAccumulatorList == null){ 33 resourceEnergyAccumulatorList = new ArrayList< GSSAccumulator>();33 resourceEnergyAccumulatorList = new ArrayList<DCwormsAccumulator>(); 34 34 } 35 35 resourceEnergyAccumulatorList.add(resourceEnergyAccumulator); … … 37 37 } 38 38 39 public Map<String, List< GSSAccumulator>> getMetricsData(){39 public Map<String, List<DCwormsAccumulator>> getMetricsData(){ 40 40 return metricsData; 41 41 } -
DCWoRMS/branches/coolemall/src/simulator/stats/AccumulatedStatistics.java
r481 r1396 10 10 import java.util.List; 11 11 12 import simulator.stats.implementation.DCWormsStatistics;13 12 import gridsim.Accumulator; 14 13 … … 50 49 } 51 50 52 GSSAccumulator resourceLoad = getAccumulatedResourceLoad();53 GSSAccumulator reservationLoad = getAccumulatedReservationLoad();54 GSSAccumulator makespan = getAccumulatedMakespan();55 GSSAccumulator taskExecutionTime = getAccumulatedJobExecutionTime();56 GSSAccumulator taskQueueLength = getAccumulatedQueueJobCount();57 GSSAccumulator taskCompletionTime = getAccumulatedCompletionTime();58 GSSAccumulator taskWaitingTime = getAccumulatedWaitingTime();59 GSSAccumulator taskFlowTime = getAccumulatedJobFlowTime();60 GSSAccumulator taskLateness = getAccumulatedLateness();61 GSSAccumulator delayedTasks = getAccumulatedDelayedTasks();62 GSSAccumulator taskTardiness = getAccumulatedTardiness();63 GSSAccumulator failedRequests = getAccumulatedFailedRequests();51 DCwormsAccumulator resourceLoad = getAccumulatedResourceLoad(); 52 DCwormsAccumulator reservationLoad = getAccumulatedReservationLoad(); 53 DCwormsAccumulator makespan = getAccumulatedMakespan(); 54 DCwormsAccumulator taskExecutionTime = getAccumulatedJobExecutionTime(); 55 DCwormsAccumulator taskQueueLength = getAccumulatedQueueJobCount(); 56 DCwormsAccumulator taskCompletionTime = getAccumulatedCompletionTime(); 57 DCwormsAccumulator taskWaitingTime = getAccumulatedWaitingTime(); 58 DCwormsAccumulator taskFlowTime = getAccumulatedJobFlowTime(); 59 DCwormsAccumulator taskLateness = getAccumulatedLateness(); 60 DCwormsAccumulator delayedTasks = getAccumulatedDelayedTasks(); 61 DCwormsAccumulator taskTardiness = getAccumulatedTardiness(); 62 DCwormsAccumulator failedRequests = getAccumulatedFailedRequests(); 64 63 65 64 out.print("Delayed tasks (accumulated)"); … … 91 90 } 92 91 93 public GSSAccumulator getAccumulatedResourceLoad() {94 GSSAccumulator resourceMeanLoad = new GSSAccumulator();95 for (SimulationStatistics simStat : simulations) { 96 GSSAccumulator simulationResTotalLoad = simStat.getStats(SimulationStatistics.RESOURCES_TOTAL_LOAD);92 public DCwormsAccumulator getAccumulatedResourceLoad() { 93 DCwormsAccumulator resourceMeanLoad = new DCwormsAccumulator(); 94 for (SimulationStatistics simStat : simulations) { 95 DCwormsAccumulator simulationResTotalLoad = simStat.getStats(SimulationStatistics.RESOURCES_TOTAL_LOAD); 97 96 resourceMeanLoad.add(simulationResTotalLoad.getMean()); 98 97 } … … 100 99 } 101 100 102 public GSSAccumulator getAccumulatedReservationLoad(){103 GSSAccumulator reservationMean = new GSSAccumulator();101 public DCwormsAccumulator getAccumulatedReservationLoad(){ 102 DCwormsAccumulator reservationMean = new DCwormsAccumulator(); 104 103 for (SimulationStatistics simStat : simulations) { 105 104 Accumulator simulationResvTotalLoad = simStat.getStats(SimulationStatistics.RESOURCES_RESERVATION_LOAD); … … 119 118 }*/ 120 119 121 public GSSAccumulator getAccumulatedJobFlowTime() {122 GSSAccumulator meanJobFlowTime = new GSSAccumulator();120 public DCwormsAccumulator getAccumulatedJobFlowTime() { 121 DCwormsAccumulator meanJobFlowTime = new DCwormsAccumulator(); 123 122 for (SimulationStatistics simStat : simulations) { 124 123 Accumulator simulationJobFlowTime = simStat.getStats(SimulationStatistics.TASK_FLOW_TIME); … … 128 127 } 129 128 130 public GSSAccumulator getAccumulatedLateness() {131 GSSAccumulator meanLateness = new GSSAccumulator();129 public DCwormsAccumulator getAccumulatedLateness() { 130 DCwormsAccumulator meanLateness = new DCwormsAccumulator(); 132 131 for (SimulationStatistics simStat : simulations) { 133 132 Accumulator simulationLateness = simStat.getStats(SimulationStatistics.TASK_LATENESS); … … 137 136 } 138 137 139 public GSSAccumulator getAccumulatedFailedRequests() {140 GSSAccumulator meanFailedRequests = new GSSAccumulator();138 public DCwormsAccumulator getAccumulatedFailedRequests() { 139 DCwormsAccumulator meanFailedRequests = new DCwormsAccumulator(); 141 140 for (SimulationStatistics simStat : simulations) { 142 141 Accumulator simulationFailedRequestes = simStat.getStats(SimulationStatistics.FAILED_REQUESTS); … … 146 145 } 147 146 148 public GSSAccumulator getAccumulatedTardiness() {149 GSSAccumulator meanTardiness = new GSSAccumulator();147 public DCwormsAccumulator getAccumulatedTardiness() { 148 DCwormsAccumulator meanTardiness = new DCwormsAccumulator(); 150 149 for (SimulationStatistics simStat : simulations) { 151 150 Accumulator simulationJobTardiness = simStat.getStats(SimulationStatistics.TASK_TARDINESS); … … 155 154 } 156 155 157 public GSSAccumulator getAccumulatedDelayedTasks() {158 GSSAccumulator delayedTasks = new GSSAccumulator();156 public DCwormsAccumulator getAccumulatedDelayedTasks() { 157 DCwormsAccumulator delayedTasks = new DCwormsAccumulator(); 159 158 for (SimulationStatistics simStat : simulations) { 160 159 Accumulator simulationDelayedTasks = simStat.getStats(SimulationStatistics.DELAYED_TASKS); … … 164 163 } 165 164 166 public GSSAccumulator getAccumulatedCompletionTime() {167 GSSAccumulator meanJobCompletionTime = new GSSAccumulator();165 public DCwormsAccumulator getAccumulatedCompletionTime() { 166 DCwormsAccumulator meanJobCompletionTime = new DCwormsAccumulator(); 168 167 169 168 for (SimulationStatistics simStat : simulations) { … … 174 173 } 175 174 176 public GSSAccumulator getAccumulatedMakespan() {177 GSSAccumulator meanMakespan = new GSSAccumulator();175 public DCwormsAccumulator getAccumulatedMakespan() { 176 DCwormsAccumulator meanMakespan = new DCwormsAccumulator(); 178 177 for (SimulationStatistics simStat : simulations) { 179 178 meanMakespan.add(simStat.getStats(SimulationStatistics.MAKESPAN).getMean()); … … 182 181 } 183 182 184 public GSSAccumulator getAccumulatedWaitingTime() {185 GSSAccumulator meanWaitingTime = new GSSAccumulator();183 public DCwormsAccumulator getAccumulatedWaitingTime() { 184 DCwormsAccumulator meanWaitingTime = new DCwormsAccumulator(); 186 185 for (SimulationStatistics simStat : simulations) 187 186 meanWaitingTime.add(simStat.getStats(SimulationStatistics.TASK_WAITING_TIME).getMean()); … … 189 188 } 190 189 191 public GSSAccumulator getAccumulatedJobExecutionTime() {192 GSSAccumulator meanJobExecutionTime = new GSSAccumulator();190 public DCwormsAccumulator getAccumulatedJobExecutionTime() { 191 DCwormsAccumulator meanJobExecutionTime = new DCwormsAccumulator(); 193 192 for (SimulationStatistics simStat : simulations) 194 193 meanJobExecutionTime.add(simStat.getStats(SimulationStatistics.TASK_EXECUTION_TIME).getMean()); … … 196 195 } 197 196 198 public GSSAccumulator getAccumulatedQueueJobCount() {199 GSSAccumulator meanQueuJobCount = new GSSAccumulator();197 public DCwormsAccumulator getAccumulatedQueueJobCount() { 198 DCwormsAccumulator meanQueuJobCount = new DCwormsAccumulator(); 200 199 for (SimulationStatistics simStat : simulations) 201 200 meanQueuJobCount.add(simStat.getStats(SimulationStatistics.RESOURCES_QUEUE_LENGTH).getMean()); -
DCWoRMS/branches/coolemall/src/simulator/stats/CoolEmAllMetricsCalculator.java
r1331 r1396 51 51 52 52 double roomPower = 0; 53 for( GSSAccumulator acc: metricsData.get("Room")){53 for(DCwormsAccumulator acc: metricsData.get("Room")){ 54 54 roomPower = roomPower + acc.getSum(); 55 55 } … … 66 66 try{ 67 67 double itComputingPower = 0; 68 for( GSSAccumulator acc: metricsData.get("Processor")){68 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 69 69 itComputingPower = itComputingPower + acc.getSum(); 70 70 } … … 81 81 try{ 82 82 double totalSitePower = 0; 83 for( GSSAccumulator acc: metricsData.get("Rack")){83 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 84 84 totalSitePower = totalSitePower + acc.getSum(); 85 85 } 86 86 double nodeComputingPower = 0; 87 for( GSSAccumulator acc: metricsData.get("Node")){87 for(DCwormsAccumulator acc: metricsData.get("Node")){ 88 88 nodeComputingPower = nodeComputingPower+ acc.getSum(); 89 89 } 90 90 double itComputingPower = 0; 91 for( GSSAccumulator acc: metricsData.get("Processor")){91 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 92 92 itComputingPower = itComputingPower + acc.getSum(); 93 93 } … … 105 105 try{ 106 106 double nodeComputingPower = 0; 107 for( GSSAccumulator acc: metricsData.get("Node")){107 for(DCwormsAccumulator acc: metricsData.get("Node")){ 108 108 nodeComputingPower = nodeComputingPower+ acc.getSum(); 109 109 } 110 110 double itComputingPower = 0; 111 for( GSSAccumulator acc: metricsData.get("Processor")){111 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 112 112 itComputingPower = itComputingPower + acc.getSum(); 113 113 } … … 126 126 127 127 double roomPower = 0; 128 for( GSSAccumulator acc: metricsData.get("Room")){128 for(DCwormsAccumulator acc: metricsData.get("Room")){ 129 129 roomPower = roomPower + acc.getSum(); 130 130 } 131 131 132 132 double totalSitePower = 0; 133 for( GSSAccumulator acc: metricsData.get("Rack")){133 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 134 134 totalSitePower = totalSitePower + acc.getSum(); 135 135 } … … 137 137 138 138 double nodeComputingPower = 0; 139 for( GSSAccumulator acc: metricsData.get("Node")){139 for(DCwormsAccumulator acc: metricsData.get("Node")){ 140 140 nodeComputingPower = nodeComputingPower+ acc.getSum(); 141 141 } 142 142 double itComputingPower = 0; 143 for( GSSAccumulator acc: metricsData.get("Processor")){143 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 144 144 itComputingPower = itComputingPower + acc.getSum(); 145 145 } … … 159 159 160 160 double roomPower = 0; 161 for( GSSAccumulator acc: metricsData.get("Room")){161 for(DCwormsAccumulator acc: metricsData.get("Room")){ 162 162 roomPower = roomPower + acc.getSum(); 163 163 } 164 164 165 165 double totalSitePower = 0; 166 for( GSSAccumulator acc: metricsData.get("Rack")){166 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 167 167 totalSitePower = totalSitePower + acc.getSum(); 168 168 } … … 183 183 for(String key: metricsData.keySet()){ 184 184 if(key.contains("UW_")){ 185 for( GSSAccumulator acc: metricsData.get(key)){185 for(DCwormsAccumulator acc: metricsData.get(key)){ 186 186 usefulWork= usefulWork + acc.getSum(); 187 187 } … … 203 203 for(String key: metricsData.keySet()){ 204 204 if(key.contains("/")){ 205 for( GSSAccumulator acc: metricsData.get(key)){205 for(DCwormsAccumulator acc: metricsData.get(key)){ 206 206 usefulWork= usefulWork + acc.getSum(); 207 207 } … … 209 209 } 210 210 double totalSitePower = 0; 211 for( GSSAccumulator acc: metricsData.get("Rack")){211 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 212 212 totalSitePower = totalSitePower + acc.getSum(); 213 213 } … … 228 228 double maxPower = 0; 229 229 230 for( GSSAccumulator acc: metricsData.get("Rack_MAX")){230 for(DCwormsAccumulator acc: metricsData.get("Rack_MAX")){ 231 231 maxPower = maxPower + acc.getSum(); 232 232 } … … 246 246 double maxPower = 0; 247 247 248 for( GSSAccumulator acc: metricsData.get("Room_MAX")){248 for(DCwormsAccumulator acc: metricsData.get("Room_MAX")){ 249 249 maxPower = maxPower + acc.getSum(); 250 250 } … … 263 263 try{ 264 264 double inletsPower = 0; 265 for( GSSAccumulator acc: metricsData.get("Inlet")){265 for(DCwormsAccumulator acc: metricsData.get("Inlet")){ 266 266 inletsPower = inletsPower + acc.getSum(); 267 267 } 268 268 269 269 double outletsPower = 0; 270 for( GSSAccumulator acc: metricsData.get("Outlet")){270 for(DCwormsAccumulator acc: metricsData.get("Outlet")){ 271 271 outletsPower = outletsPower + acc.getSum(); 272 272 } 273 273 274 274 double nodeComputingPower = 0; 275 for( GSSAccumulator acc: metricsData.get("Node")){275 for(DCwormsAccumulator acc: metricsData.get("Node")){ 276 276 nodeComputingPower = nodeComputingPower+ acc.getSum(); 277 277 } 278 278 double itComputingPower = 0; 279 for( GSSAccumulator acc: metricsData.get("Processor")){279 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 280 280 itComputingPower = itComputingPower + acc.getSum(); 281 281 } … … 294 294 try{ 295 295 double roomPower = 0; 296 for( GSSAccumulator acc: metricsData.get("Rack")){296 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 297 297 roomPower = roomPower + acc.getSum(); 298 298 } … … 309 309 try{ 310 310 double coolingDevicePower = 0; 311 for( GSSAccumulator acc: metricsData.get("CoolingDevice")){311 for(DCwormsAccumulator acc: metricsData.get("CoolingDevice")){ 312 312 coolingDevicePower = coolingDevicePower + acc.getSum(); 313 313 } … … 327 327 for(String key: metricsData.keySet()){ 328 328 if(key.contains("FlowPump")){ 329 for( GSSAccumulator acc: metricsData.get(key)){329 for(DCwormsAccumulator acc: metricsData.get(key)){ 330 330 flowPump = flowPump + acc.getSum(); 331 331 } … … 346 346 try{ 347 347 double roomPower = 0; 348 for( GSSAccumulator acc: metricsData.get("Room")){348 for(DCwormsAccumulator acc: metricsData.get("Room")){ 349 349 roomPower = roomPower + acc.getSum(); 350 350 } 351 351 352 352 double totalSitePower = 0; 353 for( GSSAccumulator acc: metricsData.get("Rack")){353 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 354 354 totalSitePower = totalSitePower + acc.getSum(); 355 355 } 356 356 357 357 double coolingDevicePower = 0; 358 for( GSSAccumulator acc: metricsData.get("CoolingDevice")){358 for(DCwormsAccumulator acc: metricsData.get("CoolingDevice")){ 359 359 coolingDevicePower = coolingDevicePower + acc.getSum(); 360 360 } 361 361 362 362 double inletsPower = 0; 363 for( GSSAccumulator acc: metricsData.get("Inlet")){363 for(DCwormsAccumulator acc: metricsData.get("Inlet")){ 364 364 inletsPower = inletsPower + acc.getSum(); 365 365 } 366 366 367 367 double outletsPower = 0; 368 for( GSSAccumulator acc: metricsData.get("Outlet")){368 for(DCwormsAccumulator acc: metricsData.get("Outlet")){ 369 369 outletsPower = outletsPower + acc.getSum(); 370 370 } 371 371 372 372 double nodeComputingPower = 0; 373 for( GSSAccumulator acc: metricsData.get("Node")){373 for(DCwormsAccumulator acc: metricsData.get("Node")){ 374 374 nodeComputingPower = nodeComputingPower+ acc.getSum(); 375 375 } 376 376 double itComputingPower = 0; 377 for( GSSAccumulator acc: metricsData.get("Processor")){377 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 378 378 itComputingPower = itComputingPower + acc.getSum(); 379 379 } … … 394 394 395 395 double roomPower = 0; 396 for( GSSAccumulator acc: metricsData.get("Room")){396 for(DCwormsAccumulator acc: metricsData.get("Room")){ 397 397 roomPower = roomPower + acc.getSum(); 398 398 } … … 411 411 412 412 double roomPower = 0; 413 for( GSSAccumulator acc: metricsData.get("Rack")){413 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 414 414 roomPower = roomPower + acc.getSum(); 415 415 } … … 427 427 double itComputingEnergy = 0; 428 428 429 for( GSSAccumulator acc: metricsData.get("Processor_CALC")){429 for(DCwormsAccumulator acc: metricsData.get("Processor_CALC")){ 430 430 itComputingEnergy = itComputingEnergy + acc.getSum(); 431 431 } -
DCWoRMS/branches/coolemall/src/simulator/stats/DCwormsAccumulator.java
r477 r1396 4 4 package simulator.stats; 5 5 6 import java.io.PrintStream;7 6 8 7 import simulator.DataCenterWorkloadSimulator; … … 15 14 * 16 15 */ 17 public class GSSAccumulator extends Accumulator {16 public class DCwormsAccumulator extends Accumulator { 18 17 19 public GSSAccumulator() {18 public DCwormsAccumulator() { 20 19 super(); 21 20 } 22 21 23 public GSSAccumulator(Accumulator acc) {22 public DCwormsAccumulator(Accumulator acc) { 24 23 n_ = acc.getCount(); 25 24 mean_ = acc.getMean(); … … 49 48 50 49 public boolean equals(Object obj) { 51 if (!(obj instanceof GSSAccumulator))50 if (!(obj instanceof DCwormsAccumulator)) 52 51 return false; 53 52 54 GSSAccumulator otherAcc = (GSSAccumulator) obj;53 DCwormsAccumulator otherAcc = (DCwormsAccumulator) obj; 55 54 if (Double.compare(this.last_, otherAcc.last_) != 0) 56 55 return false; -
DCWoRMS/branches/coolemall/src/simulator/stats/DCwormsMetricsCalculator.java
r1377 r1396 5 5 6 6 import simulator.stats.implementation.MetricsStats; 7 import example.energy.coolemall.CoolEmAllTestbedMeasurements;8 7 9 8 public class DCwormsMetricsCalculator extends AbstractMetricsCalculator{ … … 45 44 46 45 double roomPower = 0; 47 for( GSSAccumulator acc: metricsData.get("Room")){46 for(DCwormsAccumulator acc: metricsData.get("Room")){ 48 47 roomPower = roomPower + acc.getSum(); 49 48 } … … 61 60 try{ 62 61 double itComputingPower = 0; 63 for( GSSAccumulator acc: metricsData.get("Processor")){62 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 64 63 itComputingPower = itComputingPower + acc.getSum(); 65 64 } … … 76 75 try{ 77 76 double totalSitePower = 0; 78 for( GSSAccumulator acc: metricsData.get("Rack")){77 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 79 78 totalSitePower = totalSitePower + acc.getSum(); 80 79 } 81 80 double nodeComputingPower = 0; 82 for( GSSAccumulator acc: metricsData.get("Node")){81 for(DCwormsAccumulator acc: metricsData.get("Node")){ 83 82 nodeComputingPower = nodeComputingPower+ acc.getSum(); 84 83 } 85 84 double itComputingPower = 0; 86 for( GSSAccumulator acc: metricsData.get("Processor")){85 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 87 86 itComputingPower = itComputingPower + acc.getSum(); 88 87 } … … 101 100 102 101 double roomPower = 0; 103 for( GSSAccumulator acc: metricsData.get("Room")){102 for(DCwormsAccumulator acc: metricsData.get("Room")){ 104 103 roomPower = roomPower + acc.getSum(); 105 104 } 106 105 107 106 double totalSitePower = 0; 108 for( GSSAccumulator acc: metricsData.get("Rack")){107 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 109 108 totalSitePower = totalSitePower + acc.getSum(); 110 109 } … … 112 111 113 112 double nodeComputingPower = 0; 114 for( GSSAccumulator acc: metricsData.get("Node")){113 for(DCwormsAccumulator acc: metricsData.get("Node")){ 115 114 nodeComputingPower = nodeComputingPower+ acc.getSum(); 116 115 } 117 116 double itComputingPower = 0; 118 for( GSSAccumulator acc: metricsData.get("Processor")){117 for(DCwormsAccumulator acc: metricsData.get("Processor")){ 119 118 itComputingPower = itComputingPower + acc.getSum(); 120 119 } … … 134 133 135 134 double roomPower = 0; 136 for( GSSAccumulator acc: metricsData.get("Room")){135 for(DCwormsAccumulator acc: metricsData.get("Room")){ 137 136 roomPower = roomPower + acc.getSum(); 138 137 } 139 138 140 139 double totalSitePower = 0; 141 for( GSSAccumulator acc: metricsData.get("Rack")){140 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 142 141 totalSitePower = totalSitePower + acc.getSum(); 143 142 } … … 158 157 for(String key: metricsData.keySet()){ 159 158 if(key.contains("/")){ 160 for( GSSAccumulator acc: metricsData.get(key)){159 for(DCwormsAccumulator acc: metricsData.get(key)){ 161 160 usefulWork= usefulWork + acc.getSum(); 162 161 } … … 178 177 for(String key: metricsData.keySet()){ 179 178 if(key.contains("/")){ 180 for( GSSAccumulator acc: metricsData.get(key)){179 for(DCwormsAccumulator acc: metricsData.get(key)){ 181 180 usefulWork= usefulWork + acc.getSum(); 182 181 } … … 184 183 } 185 184 double totalSitePower = 0; 186 for( GSSAccumulator acc: metricsData.get("Rack")){185 for(DCwormsAccumulator acc: metricsData.get("Rack")){ 187 186 totalSitePower = totalSitePower + acc.getSum(); 188 187 } … … 204 203 double maxPower = 0; 205 204 206 for( GSSAccumulator acc: metricsData.get("Room_MAX")){205 for(DCwormsAccumulator acc: metricsData.get("Room_MAX")){ 207 206 maxPower = maxPower + acc.getSum(); 208 207 } … … 221 220 try{ 222 221 double coolingDevicePower = 0; 223 for( GSSAccumulator acc: metricsData.get("CoolingDevice")){222 for(DCwormsAccumulator acc: metricsData.get("CoolingDevice")){ 224 223 coolingDevicePower = coolingDevicePower + acc.getSum(); 225 224 } … … 237 236 238 237 double roomPower = 0; 239 for( GSSAccumulator acc: metricsData.get("Room")){238 for(DCwormsAccumulator acc: metricsData.get("Room")){ 240 239 roomPower = roomPower + acc.getSum(); 241 240 } … … 252 251 try{ 253 252 double itComputingEnergy = 0; 254 for( GSSAccumulator acc: metricsData.get("Processor_CALC")){253 for(DCwormsAccumulator acc: metricsData.get("Processor_CALC")){ 255 254 itComputingEnergy = itComputingEnergy + acc.getSum(); 256 255 } -
DCWoRMS/branches/coolemall/src/simulator/stats/MetricsCalculator.java
r1299 r1396 10 10 public List<MetricsStats> calulateMetrics(); 11 11 12 public void addMetricsData(String resourceTypeName, GSSAccumulator resourceEnergyAccumulator);12 public void addMetricsData(String resourceTypeName, DCwormsAccumulator resourceEnergyAccumulator); 13 13 14 public Map<String, List< GSSAccumulator>> getMetricsData();14 public Map<String, List<DCwormsAccumulator>> getMetricsData(); 15 15 16 16 } -
DCWoRMS/branches/coolemall/src/simulator/stats/SimulationStatistics.java
r477 r1396 44 44 public String getOutputFolderName(); 45 45 46 public GSSAccumulator getStats(String resourcesTotalLoad);46 public DCwormsAccumulator getStats(String resourcesTotalLoad); 47 47 48 48 public boolean accumulatedStats(); -
DCWoRMS/branches/coolemall/src/simulator/stats/StatisticsInfo.java
r477 r1396 9 9 10 10 /** The mean value */ 11 protected GSSAccumulator mean;11 protected DCwormsAccumulator mean; 12 12 /** The standard deviation value */ 13 protected GSSAccumulator stdev;13 protected DCwormsAccumulator stdev; 14 14 /** The minimal value */ 15 protected GSSAccumulator max;15 protected DCwormsAccumulator max; 16 16 /** The maximal value */ 17 protected GSSAccumulator min;17 protected DCwormsAccumulator min; 18 18 /** 19 19 * @param mean … … 22 22 * @param min 23 23 */ 24 public StatisticsInfo( GSSAccumulator mean, GSSAccumulator stdev, GSSAccumulator max, GSSAccumulator min) {24 public StatisticsInfo(DCwormsAccumulator mean, DCwormsAccumulator stdev, DCwormsAccumulator max, DCwormsAccumulator min) { 25 25 this.mean = mean; 26 26 this.stdev = stdev; … … 31 31 * @return the maximal value 32 32 */ 33 public GSSAccumulator getMax() {33 public DCwormsAccumulator getMax() { 34 34 return max; 35 35 } … … 37 37 * @return the mean value 38 38 */ 39 public GSSAccumulator getMean() {39 public DCwormsAccumulator getMean() { 40 40 return mean; 41 41 } … … 43 43 * @return the minimal value 44 44 */ 45 public GSSAccumulator getMin() {45 public DCwormsAccumulator getMin() { 46 46 return min; 47 47 } … … 49 49 * @return the standard deviation value 50 50 */ 51 public GSSAccumulator getStdev() {51 public DCwormsAccumulator getStdev() { 52 52 return stdev; 53 53 } -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/AccumulatedResourceStats.java
r477 r1396 1 1 package simulator.stats.implementation; 2 2 3 import simulator.stats. GSSAccumulator;3 import simulator.stats.DCwormsAccumulator; 4 4 import simulator.stats.implementation.out.StatsSerializer; 5 5 … … 12 12 13 13 // accumulated resource statistic 14 protected GSSAccumulator resourceLoad;15 protected GSSAccumulator resourceReservationLoad;14 protected DCwormsAccumulator resourceLoad; 15 protected DCwormsAccumulator resourceReservationLoad; 16 16 protected String resourceName; 17 17 … … 21 21 public AccumulatedResourceStats(String resourceName) { 22 22 this.resourceName = resourceName; 23 this.resourceLoad = new GSSAccumulator();24 this.resourceReservationLoad = new GSSAccumulator();23 this.resourceLoad = new DCwormsAccumulator(); 24 this.resourceReservationLoad = new DCwormsAccumulator(); 25 25 } 26 26 … … 37 37 } 38 38 39 public GSSAccumulator getResourceLoad() {39 public DCwormsAccumulator getResourceLoad() { 40 40 return this.resourceLoad; 41 41 } 42 42 43 public GSSAccumulator getResourceReservationLoad() {43 public DCwormsAccumulator getResourceReservationLoad() { 44 44 return this.resourceReservationLoad; 45 45 } -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/DCWormsStatistics.java
r1374 r1396 59 59 import schedframe.ExecutablesList; 60 60 import schedframe.SimulatedEnvironment; 61 import schedframe. exceptions.ResourceException;61 import schedframe.resources.CustomResourceType; 62 62 import schedframe.resources.ResourceType; 63 import schedframe.resources.UserResourceType;64 63 import schedframe.resources.computing.ComputingResource; 65 import schedframe.resources.computing.Processor;66 64 import schedframe.resources.computing.extensions.Extension; 67 65 import schedframe.resources.computing.extensions.ExtensionList; … … 69 67 import schedframe.resources.computing.profiles.energy.EnergyExtension; 70 68 import schedframe.resources.computing.profiles.energy.MeasurementHistory; 71 import schedframe.resources.computing.profiles.energy.airthroughput.Air FlowValue;69 import schedframe.resources.computing.profiles.energy.airthroughput.AirflowValue; 72 70 import schedframe.resources.computing.profiles.energy.power.PowerUsage; 73 71 import schedframe.resources.computing.profiles.energy.thermal.TemperatureValue; … … 80 78 import schedframe.resources.units.StandardResourceUnitName; 81 79 import schedframe.scheduling.ExecutionHistoryItem; 82 import schedframe.scheduling.Resource HistoryItem;80 import schedframe.scheduling.ResourceItem; 83 81 import schedframe.scheduling.Scheduler; 84 82 import schedframe.scheduling.manager.tasks.JobRegistry; … … 91 89 import simulator.GenericUser; 92 90 import simulator.stats.CoolEmAllMetricsCalculator; 91 import simulator.stats.DCwormsAccumulator; 93 92 import simulator.stats.DCwormsMetricsCalculator; 94 import simulator.stats.GSSAccumulator;95 93 import simulator.stats.MetricsCalculator; 96 94 import simulator.stats.SimulationStatistics; … … 124 122 protected static final String RESOURCEUTILIZATION_STATISTICS_OUTPUT_FILE_NAME = "ResourceUtilization.txt"; 125 123 protected static final String ENERGYUSAGE_STATISTICS_OUTPUT_FILE_NAME = "EnergyUsage.txt"; 126 protected static final String AIRFLOW_STATISTICS_OUTPUT_FILE_NAME = "Air Throughput.txt";124 protected static final String AIRFLOW_STATISTICS_OUTPUT_FILE_NAME = "Airflow.txt"; 127 125 protected static final String TEMPERATURE_STATISTICS_OUTPUT_FILE_NAME = "Temperature.txt"; 128 126 protected static final String USEFUL_WORK_STATISTICS_OUTPUT_FILE_NAME = "UsefulWork.txt"; … … 144 142 145 143 protected GSSAccumulatorsStats accStats; 146 protected Map<String, GSSAccumulator> statsData;144 protected Map<String, DCwormsAccumulator> statsData; 147 145 148 146 protected GenericUser users; … … 232 230 task_processorsMap = new HashMap<String, Set<ComputingResource>>(); 233 231 accStats = new GSSAccumulatorsStats(); 234 statsData = new HashMap<String, GSSAccumulator>();232 statsData = new HashMap<String, DCwormsAccumulator>(); 235 233 236 234 this.serializer = new StringSerializer(); … … 298 296 cStats.add(Stats.chartEnergy); 299 297 cStats.add(Stats.textAirFlow); 300 if(ArrayUtils.contains(configuration.resForAir FlowChart, resourceTypeName))298 if(ArrayUtils.contains(configuration.resForAirflowChart, resourceTypeName)) 301 299 cStats.add(Stats.chartAirFlow); 302 300 cStats.add(Stats.textTemperature); … … 420 418 List<ComputingResource> compResources = null; 421 419 for(String resourceTypeName: resourceController.getComputingResourceLayers()){ 422 GSSAccumulator resourceEnergyAccumulator = new GSSAccumulator();423 GSSAccumulator maxResourceEnergyAccumulator = new GSSAccumulator();424 GSSAccumulator calculationsEnergyAccumulator = new GSSAccumulator();420 DCwormsAccumulator resourceEnergyAccumulator = new DCwormsAccumulator(); 421 DCwormsAccumulator maxResourceEnergyAccumulator = new DCwormsAccumulator(); 422 DCwormsAccumulator calculationsEnergyAccumulator = new DCwormsAccumulator(); 425 423 compResources = new ArrayList<ComputingResource>(); 426 424 for(ComputingResource compRes: resourceController.getComputingResources() ){ 427 compResources.addAll(compRes.getDescendantsByType(new UserResourceType(resourceTypeName)));425 compResources.addAll(compRes.getDescendantsByType(new CustomResourceType(resourceTypeName))); 428 426 } 429 427 if(resourceController.getComputingResources().get(0).getType().getName().equals(resourceTypeName)) … … 526 524 527 525 for(Device device: compResource.getResourceCharacteristic().getDevices()){ 528 GSSAccumulator devAccumulator = new GSSAccumulator();526 DCwormsAccumulator devAccumulator = new DCwormsAccumulator(); 529 527 ResourcePowerStats deviceEnergyUsage = gatherResourcePowerConsumptionStats(device); 530 528 deviceEnergyUsage.setMeanValue(calculateMeanValue(deviceEnergyUsage)); … … 592 590 } 593 591 594 if(ArrayUtils.contains(configuration.resForAir FlowChart, device.getType().getName())){592 if(ArrayUtils.contains(configuration.resForAirflowChart, device.getType().getName())){ 595 593 if (configuration.creatediagrams_resairflow) { 596 594 createResourceAirFlowDiagramData(deviceAirFlow); … … 767 765 768 766 769 LinkedList<Resource HistoryItem> resourceHistory = exec.getAllocatedResources();767 LinkedList<ResourceItem> resourceHistory = exec.getAllocatedResources(); 770 768 if(resourceHistory.size() == 0) 771 769 continue; … … 805 803 806 804 try{ 807 double usefulWork = execTask.get ResourceConsumptionProfile().getUsefulWork()/pes.size();805 double usefulWork = execTask.getExecutionProfile().getUsefulWork()/pes.size(); 808 806 //double usefulWork = gatherUsefulWorkStats(pe).getValue(); 809 GSSAccumulator uwAcc;807 DCwormsAccumulator uwAcc; 810 808 if(metCalc.getMetricsData().containsKey("UW_" + pe.getFullName())){ 811 809 uwAcc = metCalc.getMetricsData().get("UW_" + pe.getFullName()).get(0); 812 810 uwAcc.add(usefulWork); 813 811 } else { 814 uwAcc = new GSSAccumulator();812 uwAcc = new DCwormsAccumulator(); 815 813 uwAcc.add(usefulWork); 816 814 metCalc.addMetricsData("UW_" + pe.getFullName(), uwAcc); … … 832 830 Executable exec = (Executable) execTask; 833 831 834 LinkedList<Resource HistoryItem> resourceHistory = exec.getAllocatedResources();832 LinkedList<ResourceItem> resourceHistory = exec.getAllocatedResources(); 835 833 if(resourceHistory.size() == 0) 836 834 continue; 837 835 838 836 for(int i = 0; i < resourceHistory .size(); i++){ 839 Resource HistoryItem resHistItem = resourceHistory.get(i);837 ResourceItem resHistItem = resourceHistory.get(i); 840 838 Map<ResourceUnitName, ResourceUnit> res = resHistItem.getResourceUnits(); 841 839 ResourceUnit resUnit = res.get(StandardResourceUnitName.PE); 842 840 //ProcessingElements pes = (ProcessingElements) resUnit ; 843 LinkedList<ExecutionHistoryItem> execHistory = exec.getExec History();841 LinkedList<ExecutionHistoryItem> execHistory = exec.getExecutionHistory(); 844 842 long st = -1, et; 845 843 for(int j = 0; j < execHistory .size(); j++){ … … 893 891 894 892 try{ 895 double usefulWork = execTask.get ResourceConsumptionProfile().getUsefulWork()/pes.size();893 double usefulWork = execTask.getExecutionProfile().getUsefulWork()/pes.size(); 896 894 usefulWork = ((et - st) / (1000 * getExecutionTime(execTask))) * usefulWork; 897 GSSAccumulator uwAcc;895 DCwormsAccumulator uwAcc; 898 896 if(metCalc.getMetricsData().containsKey("UW_" + pe.getFullName())){ 899 897 uwAcc = metCalc.getMetricsData().get("UW_" + pe.getFullName()).get(0); 900 898 uwAcc.add(usefulWork); 901 899 } else { 902 uwAcc = new GSSAccumulator();900 uwAcc = new DCwormsAccumulator(); 903 901 uwAcc.add(usefulWork); 904 902 metCalc.addMetricsData("UW_" + pe.getFullName(), uwAcc); … … 922 920 long previousTimestamp = 0; 923 921 int previousStatus = DCWormsTags.CREATED; 924 for(ExecutionHistoryItem execHistItem: execTask.getExec History()){922 for(ExecutionHistoryItem execHistItem: execTask.getExecutionHistory()){ 925 923 if(previousStatus == DCWormsTags.INEXEC){ 926 924 executionTime = executionTime + (execHistItem.getTimeStamp().getMillis()/1000 - previousTimestamp); … … 1033 1031 JobRegistry jr = new JobRegistryImpl(compResource.getFullName()); 1034 1032 for(ExecTask task: jr.getFinishedTasks()){ 1035 usefulWork = usefulWork + task.get ResourceConsumptionProfile().getUsefulWork();1033 usefulWork = usefulWork + task.getExecutionProfile().getUsefulWork(); 1036 1034 } 1037 1035 ResourceUsefulWorkStats usefulWorkStats = new ResourceUsefulWorkStats(compResource.getFullName(), compResource.getType(), usageType, usefulWork, endSimulationTime); … … 1175 1173 if(ee.getAirFlowProfile() == null) 1176 1174 break; 1177 List<Air FlowValue> airFlowHistory = ee.getAirFlowProfile().getAirThroughputHistory();1175 List<AirflowValue> airFlowHistory = ee.getAirFlowProfile().getAirflowHistory(); 1178 1176 if(airFlowHistory.size() == 0) 1179 1177 break; 1180 1178 long endSimulationTime = DateTimeUtilsExt.currentTimeMillis(); 1181 airFlowHistory.add(new Air FlowValue(endSimulationTime, ee.getAirFlowProfile().getAirThroughputHistory().get(ee.getAirFlowProfile().getAirThroughputHistory().size()-1).getValue()));1182 for(Air FlowValue af:airFlowHistory){1179 airFlowHistory.add(new AirflowValue(endSimulationTime, ee.getAirFlowProfile().getAirflowHistory().get(ee.getAirFlowProfile().getAirflowHistory().size()-1).getValue())); 1180 for(AirflowValue af:airFlowHistory){ 1183 1181 airFlow.put(af.getTimestamp(), af.getValue()); 1184 1182 } … … 1402 1400 resourceAirFlowDiagram = getResourceDynamicDiagram(resourceAirFlowDiagrams.get(resType), simulationTime, chartName, 1403 1401 subtitle, axisName); 1404 if (!saveXYPlotChart(resourceAirFlowDiagram, fileName + "Air Throughput_" + resType))1402 if (!saveXYPlotChart(resourceAirFlowDiagram, fileName + "Airflow_" + resType)) 1405 1403 return false; 1406 1404 } … … 2040 2038 } 2041 2039 2042 public GSSAccumulator getStats(String name) {2040 public DCwormsAccumulator getStats(String name) { 2043 2041 return statsData.get(name); 2044 2042 } -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/GSSAccumulatorsStats.java
r1277 r1396 1 1 package simulator.stats.implementation; 2 2 3 import simulator.stats. GSSAccumulator;3 import simulator.stats.DCwormsAccumulator; 4 4 import simulator.stats.implementation.out.StatsSerializer; 5 5 6 6 public class GSSAccumulatorsStats implements StatsInterface { 7 7 8 public GSSAccumulator meanTotalOccupancy;9 public GSSAccumulator meanTotalLoad;10 public GSSAccumulator meanQueueLength;11 public GSSAccumulator meanEnergyUsage;12 public GSSAccumulator meanAirFlow;13 public GSSAccumulator meanTemperature;8 public DCwormsAccumulator meanTotalOccupancy; 9 public DCwormsAccumulator meanTotalLoad; 10 public DCwormsAccumulator meanQueueLength; 11 public DCwormsAccumulator meanEnergyUsage; 12 public DCwormsAccumulator meanAirFlow; 13 public DCwormsAccumulator meanTemperature; 14 14 15 public GSSAccumulator meanTaskStartTime;16 public GSSAccumulator meanTaskCompletionTime;17 public GSSAccumulator meanTaskExecutionTime;18 public GSSAccumulator meanTaskWaitingTime;19 public GSSAccumulator meanTaskFlowTime;20 public GSSAccumulator lateness;21 public GSSAccumulator tardiness;22 public GSSAccumulator delayedTasks;23 public GSSAccumulator failedRequests;24 public GSSAccumulator makespan;15 public DCwormsAccumulator meanTaskStartTime; 16 public DCwormsAccumulator meanTaskCompletionTime; 17 public DCwormsAccumulator meanTaskExecutionTime; 18 public DCwormsAccumulator meanTaskWaitingTime; 19 public DCwormsAccumulator meanTaskFlowTime; 20 public DCwormsAccumulator lateness; 21 public DCwormsAccumulator tardiness; 22 public DCwormsAccumulator delayedTasks; 23 public DCwormsAccumulator failedRequests; 24 public DCwormsAccumulator makespan; 25 25 26 26 private String[] headers = { "Resource name", "mean", "stdev", "variance", … … 28 28 29 29 public GSSAccumulatorsStats() { 30 meanTotalOccupancy = new GSSAccumulator();31 meanTotalLoad = new GSSAccumulator();32 meanQueueLength = new GSSAccumulator();33 meanEnergyUsage = new GSSAccumulator();34 meanAirFlow = new GSSAccumulator();35 meanTemperature = new GSSAccumulator();30 meanTotalOccupancy = new DCwormsAccumulator(); 31 meanTotalLoad = new DCwormsAccumulator(); 32 meanQueueLength = new DCwormsAccumulator(); 33 meanEnergyUsage = new DCwormsAccumulator(); 34 meanAirFlow = new DCwormsAccumulator(); 35 meanTemperature = new DCwormsAccumulator(); 36 36 37 meanTaskStartTime = new GSSAccumulator();38 meanTaskCompletionTime = new GSSAccumulator();39 meanTaskExecutionTime = new GSSAccumulator();40 meanTaskWaitingTime = new GSSAccumulator();41 meanTaskFlowTime = new GSSAccumulator();42 lateness = new GSSAccumulator();43 tardiness = new GSSAccumulator();44 delayedTasks = new GSSAccumulator();45 failedRequests = new GSSAccumulator();46 makespan = new GSSAccumulator();37 meanTaskStartTime = new DCwormsAccumulator(); 38 meanTaskCompletionTime = new DCwormsAccumulator(); 39 meanTaskExecutionTime = new DCwormsAccumulator(); 40 meanTaskWaitingTime = new DCwormsAccumulator(); 41 meanTaskFlowTime = new DCwormsAccumulator(); 42 lateness = new DCwormsAccumulator(); 43 tardiness = new DCwormsAccumulator(); 44 delayedTasks = new DCwormsAccumulator(); 45 failedRequests = new DCwormsAccumulator(); 46 makespan = new DCwormsAccumulator(); 47 47 } 48 48 -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/JobStats.java
r477 r1396 1 1 package simulator.stats.implementation; 2 2 3 import java.io.PrintStream; 4 5 import simulator.stats.GSSAccumulator; 3 import simulator.stats.DCwormsAccumulator; 6 4 import simulator.stats.implementation.out.StatsSerializer; 7 5 … … 14 12 15 13 protected String jobID; 16 protected GSSAccumulator meanTaskCompletionTime;17 protected GSSAccumulator meanTaskExecutionTime;18 protected GSSAccumulator meanTaskStartTime;19 protected GSSAccumulator meanTaskFlowTime;20 protected GSSAccumulator meanTaskWaitingTime;21 protected GSSAccumulator meanTaskGQ_WaitingTime;22 protected GSSAccumulator lateness;23 protected GSSAccumulator tardiness;24 protected GSSAccumulator makespan;14 protected DCwormsAccumulator meanTaskCompletionTime; 15 protected DCwormsAccumulator meanTaskExecutionTime; 16 protected DCwormsAccumulator meanTaskStartTime; 17 protected DCwormsAccumulator meanTaskFlowTime; 18 protected DCwormsAccumulator meanTaskWaitingTime; 19 protected DCwormsAccumulator meanTaskGQ_WaitingTime; 20 protected DCwormsAccumulator lateness; 21 protected DCwormsAccumulator tardiness; 22 protected DCwormsAccumulator makespan; 25 23 26 24 JobStats(String jobID) { … … 35 33 36 34 private void init() { 37 this.meanTaskCompletionTime = new GSSAccumulator();38 this.meanTaskExecutionTime = new GSSAccumulator();39 this.meanTaskStartTime = new GSSAccumulator();40 this.meanTaskFlowTime = new GSSAccumulator();41 this.meanTaskWaitingTime = new GSSAccumulator();42 this.meanTaskGQ_WaitingTime = new GSSAccumulator();43 this.lateness = new GSSAccumulator();44 this.tardiness = new GSSAccumulator();45 this.makespan = new GSSAccumulator();35 this.meanTaskCompletionTime = new DCwormsAccumulator(); 36 this.meanTaskExecutionTime = new DCwormsAccumulator(); 37 this.meanTaskStartTime = new DCwormsAccumulator(); 38 this.meanTaskFlowTime = new DCwormsAccumulator(); 39 this.meanTaskWaitingTime = new DCwormsAccumulator(); 40 this.meanTaskGQ_WaitingTime = new DCwormsAccumulator(); 41 this.lateness = new DCwormsAccumulator(); 42 this.tardiness = new DCwormsAccumulator(); 43 this.makespan = new DCwormsAccumulator(); 46 44 } 47 45 … … 50 48 } 51 49 52 public GSSAccumulator getMeanTaskCompletionTime() {50 public DCwormsAccumulator getMeanTaskCompletionTime() { 53 51 return meanTaskCompletionTime; 54 52 } 55 53 56 public GSSAccumulator getMeanTaskExecutionTime() {54 public DCwormsAccumulator getMeanTaskExecutionTime() { 57 55 return meanTaskExecutionTime; 58 56 } 59 57 60 public GSSAccumulator getMeanTaskStartTime() {58 public DCwormsAccumulator getMeanTaskStartTime() { 61 59 return meanTaskStartTime; 62 60 } 63 61 64 public GSSAccumulator getMeanTaskFlowTime() {62 public DCwormsAccumulator getMeanTaskFlowTime() { 65 63 return meanTaskFlowTime; 66 64 } 67 65 68 public GSSAccumulator getMeanTaskWaitingTime() {66 public DCwormsAccumulator getMeanTaskWaitingTime() { 69 67 return meanTaskWaitingTime; 70 68 } 71 69 72 public GSSAccumulator getMeanTaskGQ_WaitingTime() {70 public DCwormsAccumulator getMeanTaskGQ_WaitingTime() { 73 71 return meanTaskGQ_WaitingTime; 74 72 } 75 73 76 public GSSAccumulator getLateness() {74 public DCwormsAccumulator getLateness() { 77 75 return lateness; 78 76 } 79 77 80 public GSSAccumulator getTardiness() {78 public DCwormsAccumulator getTardiness() { 81 79 return tardiness; 82 80 } 83 81 84 public GSSAccumulator getMakespan() {82 public DCwormsAccumulator getMakespan() { 85 83 return makespan; 86 84 } -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/ResourceHistoryStats.java
r1207 r1396 3 3 import java.util.List; 4 4 5 import schedframe.resources.ResourceHistory Changes;5 import schedframe.resources.ResourceHistoryItem; 6 6 import simulator.stats.implementation.out.StatsSerializer; 7 7 … … 10 10 private String[] headers = {"timestamp", "resourceName", "operation", "parameter" }; 11 11 12 protected List<ResourceHistory Changes> resHistChanges;12 protected List<ResourceHistoryItem> resHist; 13 13 14 public ResourceHistoryStats(List<ResourceHistoryChanges> resHistChanges) { 15 super(); 16 this.resHistChanges = resHistChanges; 14 public ResourceHistoryStats(List<ResourceHistoryItem> resHist) { 15 this.resHist = resHist; 17 16 } 18 19 17 20 18 public Object serialize(StatsSerializer serializer) { … … 26 24 } 27 25 28 29 public List<ResourceHistoryChanges> getResHistChanges() { 30 return resHistChanges; 26 public List<ResourceHistoryItem> getResourceHistory() { 27 return resHist; 31 28 } 32 29 } -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/TaskStats.java
r1362 r1396 108 108 long previousTimestamp = 0; 109 109 int previousStatus = DCWormsTags.CREATED; 110 for(ExecutionHistoryItem execHistItem: task.getExec History()){110 for(ExecutionHistoryItem execHistItem: task.getExecutionHistory()){ 111 111 if(previousStatus == DCWormsTags.INEXEC){ 112 112 executionTime = executionTime + (execHistItem.getTimeStamp().getMillis()/1000 - previousTimestamp); -
DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/CoolEmAllStringSerializer.java
r1207 r1396 8 8 9 9 import schedframe.resources.CoolEmAllResourceType; 10 import schedframe.resources.ResourceHistory Changes;10 import schedframe.resources.ResourceHistoryItem; 11 11 import schedframe.resources.StandardResourceType; 12 12 import simulator.stats.implementation.MetricsStats; … … 311 311 df.setGroupingUsed(false); 312 312 313 for(ResourceHistory Changes rhc: arg.getResHistChanges()){313 for(ResourceHistoryItem rhc: arg.getResourceHistory()){ 314 314 buffer.append(rhc.getTimestamp()); 315 315 buffer.append(fieldSeparator); 316 316 buffer.append(rhc.getResourceName()); 317 317 buffer.append(fieldSeparator); 318 buffer.append(rhc.get Operation());318 buffer.append(rhc.getAction()); 319 319 buffer.append(fieldSeparator); 320 320 buffer.append(rhc.getParamter());
Note: See TracChangeset
for help on using the changeset viewer.