Changeset 1434 for DCWoRMS/branches


Ignore:
Timestamp:
09/15/14 17:00:03 (11 years ago)
Author:
wojtekp
Message:
 
Location:
DCWoRMS/branches/coolemall/src
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/schedframe/resources/computing/profiles/energy/EnergyExtension.java

    r1423 r1434  
    218218        } 
    219219 
    220         public AirflowProfile getAirFlowProfile() { 
     220        public AirflowProfile getAirflowProfile() { 
    221221                return airflowProfile; 
    222222        } 
  • DCWoRMS/branches/coolemall/src/schedframe/resources/units/ProcessingElements.java

    r1423 r1434  
    227227                else if(delta < 0) { 
    228228                        for(int i = this.resources.size() - 1; i >= 0 && delta < 0; i--){ 
    229                                 ComputingResource r = this.resources.get(i); 
    230                                 if(r.getStatus() == ResourceStatus.BUSY){ 
    231                                         if(new JobRegistryImpl(r.getFullName()).getRunningTasks().size() == 0){ 
    232                                                 r.setStatus(ResourceStatus.FREE); 
     229                                ComputingResource cr = this.resources.get(i); 
     230                                if(cr.getStatus() == ResourceStatus.BUSY){ 
     231                                        if(new JobRegistryImpl(cr).getRunningTasks().size() == 0){ 
     232                                                cr.setStatus(ResourceStatus.FREE); 
    233233                                                delta++;         
    234234                                        } 
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/ResourceItem.java

    r1423 r1434  
    1717        protected Map<ResourceUnitName, ResourceUnit> usedResources; 
    1818        protected Set<String> resourceNames; 
     19        protected Set<ComputingResource> compResource; 
    1920 
    2021        public ResourceItem(Map<ResourceUnitName, ResourceUnit> usedResources){ 
    2122                this.usedResources = usedResources; 
    2223                this.resourceNames = saveResourceNames(); 
     24                this.compResource = saveResources(); 
    2325        } 
    2426         
     
    2931        public Set<String> getResourceNames(){ 
    3032                return resourceNames; 
     33        } 
     34         
     35        public Set<ComputingResource> getResources(){ 
     36                return compResource; 
    3137        } 
    3238         
     
    5763                return resourceNames; 
    5864        } 
     65         
     66        private Set<ComputingResource> saveResources(){ 
     67                Set<ComputingResource> compResources; 
     68                ProcessingElements pes = (ProcessingElements) usedResources.get(StandardResourceUnitName.PE); 
     69                compResources = new HashSet<ComputingResource>(pes.size(), 1); 
     70                for (ComputingResource resource: pes) { 
     71 
     72                        LinkedList<ComputingResource> toExamine = new LinkedList<ComputingResource>(); 
     73                        toExamine.push(resource); 
     74 
     75                        while (!toExamine.isEmpty()) { 
     76                                ComputingResource compResource = toExamine.pop(); 
     77                                List<ComputingResource> resources = compResource.getChildren(); 
     78                                if(resources.isEmpty()){ 
     79                                        if(!compResources.contains(compResource)){ 
     80                                                compResources.add(compResource); 
     81                                        } 
     82                                } else { 
     83                                        for (int i = 0; i < resources.size(); i++) { 
     84                                                ComputingResource resourceChild = resources.get(i); 
     85                                                toExamine.addLast(resourceChild); 
     86                                        } 
     87                                } 
     88                        } 
     89                } 
     90                return compResources; 
     91        } 
    5992} 
  • DCWoRMS/branches/coolemall/src/schedframe/scheduling/manager/tasks/JobRegistryImpl.java

    r1415 r1434  
    77import java.util.Set; 
    88 
    9 import org.apache.commons.logging.Log; 
    10 import org.apache.commons.logging.LogFactory; 
    119import org.qcg.broker.schemas.resreqs.ParentType; 
    1210import org.qcg.broker.schemas.resreqs.Workflow; 
    1311import org.qcg.broker.schemas.resreqs.types.TaskStatesName; 
    1412 
    15 import dcworms.schedframe.scheduling.ExecTask; 
    16  
    1713import qcg.shared.constants.BrokerConstants; 
    1814import schedframe.ExecutablesList; 
     15import schedframe.resources.computing.ComputingResource; 
    1916import schedframe.scheduling.tasks.JobInterface; 
    2017import schedframe.scheduling.tasks.Task; 
     18import dcworms.schedframe.scheduling.ExecTask; 
    2119 
    2220public class JobRegistryImpl extends AbstractJobRegistry { 
    2321 
    24         private static Log log = LogFactory.getLog(JobRegistryImpl.class); 
    25  
    2622        private String context; 
    27  
     23        private ComputingResource cr; 
    2824        //TO DO - consider data structure 
    2925        protected static final ExecutablesList executables = new ExecutablesList(); 
     26 
    3027        //protected static final List<ExecTask> executables = Collections.synchronizedList(new ArrayList<ExecTask>());; 
    3128        //protected static final List<ExecTaskInterface> executables = new CopyOnWriteArrayList<ExecTaskInterface>(); 
     
    3431                this.context = context; 
    3532        } 
    36  
     33         
     34        public JobRegistryImpl(ComputingResource cr) { 
     35                this.cr = cr; 
     36        } 
     37 
     38        public JobRegistryImpl() { 
     39                this(""); 
     40        } 
     41         
    3742        public boolean addExecTask(ExecTask newTask) { 
    3843                if(getTask(newTask.getJobId(), newTask.getId()) == null) { 
    39                         synchronized (executables)  { 
     44                        synchronized (executables) { 
    4045                                executables.add(newTask); 
    4146                        } 
     
    5358                        for (ExecTask task: executables) { 
    5459                                if (task.getStatus() == status) { 
    55                                         Set<String> visitedResource = task.getAllocatedResources().getLast().getResourceNames(); 
    56                                         for(String res: visitedResource){ 
    57                                                 if(res.equals(context) || res.substring(0, res.lastIndexOf("/")).contains(context)){ 
     60                                        if(cr != null){ 
     61                                                Set<ComputingResource> visitedResource = task.getAllocatedResources().getLast().getResources(); 
     62                                                if(visitedResource.contains(cr)){ 
    5863                                                        taskList.add(task); 
    59                                                         break; 
    60                                                 } 
    61                                         } 
    62                                         if(task.getSchedulerName().equals(context)) { 
    63                                                 taskList.add(task); 
    64                                         } 
    65                                 } 
    66                         } 
    67                 } 
     64                                                } else { 
     65                                                        for(ComputingResource res: visitedResource){ 
     66                                                                if(cr.contains(res)){ 
     67                                                                        taskList.add(task); 
     68                                                                        break; 
     69                                                                } 
     70                                                        } 
     71                                                } 
     72                                        } else { 
     73                                                Set<String> visitedResource = task.getAllocatedResources().getLast().getResourceNames(); 
     74                                                for(String res: visitedResource){ 
     75                                                        if(res.equals(context) || res.substring(0, res.lastIndexOf("/")).contains(context)){ 
     76                                                                taskList.add(task); 
     77                                                                break; 
     78                                                        } 
     79                                                } 
     80 
     81                                                if(task.getSchedulerName().equals(context)) { 
     82                                                        taskList.add(task); 
     83                                                } 
     84                                        } 
     85                                } 
     86                        } 
     87                } 
     88 
    6889                return taskList; 
    6990        } 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/DCWormsStatistics.java

    r1423 r1434  
    133133        protected static final String STATS_FILE_NAME_PREFIX = "Stats_"; 
    134134 
    135         protected static final String TASK_SEPARATOR = ";"; 
    136         protected static final String JOB_SEPARATOR = ";"; 
     135        protected static final String SEPARATOR = ";"; 
    137136 
    138137        protected String outputFolderName; 
     
    152151         
    153152        //RESOURCES 
    154         protected Map<String, List<ResStat>> pesStats; 
    155         protected Map<String, Double> basicResLoad; 
    156          
    157         protected Map<String, TimetableEventSource> peGanttMap; 
    158         protected Map<String, TimetableEventGroup> taskGanttMap; 
    159          
     153        protected Map<ComputingResource, List<ResStat>> peStats; 
     154 
     155                 
    160156        protected Timetable ganttDiagramTimetable; 
    161157        protected Map<String, List<XYDataset>> resourcePowerUsageDiagrams; 
    162         protected Map<String, List<XYDataset>> resourceAirFlowDiagrams; 
     158        protected Map<String, List<XYDataset>> resourceAirflowDiagrams; 
    163159        protected Map<String, List<XYDataset>> resourceTemperatureDiagrams; 
    164160        protected Map<String, List<XYDataset>> resourceOccupancyDiagrams; 
     
    173169        protected TaskSeriesCollection ganttDiagramTaskSeriesCollection; 
    174170        protected TaskSeriesCollection ganttDiagramWaitingTimeSeriesCollection; 
    175         protected Map<String, Set<ComputingResource>> task_processorsMap; 
    176  
    177         protected JobRegistry jr; 
     171        protected Map<String, Set<ComputingResource>> taskToPEMap; 
     172 
     173        protected JobRegistry jobRegistry; 
    178174        protected MetricsCalculator metCalc; 
    179175         
     
    183179                this.configuration = co; 
    184180                this.users = users; 
    185  
    186181                this.outputFolderName = outputFolderName; 
    187182                this.resourceController = resourceController; 
    188                 this.jr = new JobRegistryImpl(""); 
     183                this.jobRegistry = new JobRegistryImpl(); 
    189184                 
    190185                if(users.isSimStartTimeDefined()) 
     
    196191 
    197192                init(); 
     193        } 
     194         
     195        private void init() { 
     196                taskToPEMap = new HashMap<String, Set<ComputingResource>>(jobRegistry.getFinishedTasks().size()); 
     197 
     198                statsData = new HashMap<String, DCwormsAccumulator>(2); 
     199                accStats = new GSSAccumulatorsStats(); 
     200                 
     201                this.serializer = new StringSerializer();                
     202                this.metCalc =  new DCwormsMetricsCalculator(startSimulationTime, endSimulationTime, endSimulationTime); 
     203                 
     204                if(DataCenterWorkloadSimulator.MODE.equals("CoolEmAll")){ 
     205                        this.serializer = new CoolEmAllStringSerializer(); 
     206                        this.metCalc = new CoolEmAllMetricsCalculator(startSimulationTime, endSimulationTime, endSimulationTime); 
     207                } 
     208                 
     209                this.serializer.setDefaultNumberFormat(DataCenterWorkloadSimulator.DFAULT_NUMBER_FORMAT); 
    198210        } 
    199211 
     
    225237        public String getOutputFolderName() { 
    226238                return outputFolderName; 
    227         } 
    228  
    229         private void init() { 
    230                 task_processorsMap = new HashMap<String, Set<ComputingResource>>(); 
    231                 accStats = new GSSAccumulatorsStats(); 
    232                 statsData = new HashMap<String, DCwormsAccumulator>(); 
    233                  
    234                 this.serializer = new StringSerializer();                
    235                 this.metCalc =  new DCwormsMetricsCalculator(startSimulationTime, endSimulationTime, endSimulationTime); 
    236                  
    237                 if(DataCenterWorkloadSimulator.MODE.equals("CoolEmAll")){ 
    238                         this.serializer = new CoolEmAllStringSerializer(); 
    239                         this.metCalc = new CoolEmAllMetricsCalculator(startSimulationTime, endSimulationTime, endSimulationTime); 
    240                 } 
    241                 this.serializer.setDefaultNumberFormat(DataCenterWorkloadSimulator.DFAULT_NUMBER_FORMAT); 
    242239        } 
    243240 
     
    273270                        System.out.println("#STATS " + "System load: " + df.format(accStats.meanTotalLoad.getMean() * 100) + " [%]"); 
    274271                         
    275                          
    276272                        simulationStatsFile.println(txt); 
    277273                } 
     
    303299                        if(ArrayUtils.contains(configuration.compResForEnergyChart, resourceTypeName)) 
    304300                                cStats.add(Stats.chartEnergy); 
    305                         cStats.add(Stats.textAirFlow); 
     301                        cStats.add(Stats.textAirflow); 
    306302                        if(ArrayUtils.contains(configuration.compResForAirflowChart, resourceTypeName)) 
    307                                 cStats.add(Stats.chartAirFlow); 
     303                                cStats.add(Stats.chartAirflow); 
    308304                        cStats.add(Stats.textTemperature); 
    309305                        if(ArrayUtils.contains(configuration.compResForTemperatureChart, resourceTypeName)) 
     
    316312                resourceUtilizationDiagrams = new HashMap<String, List<XYDataset>>(2); 
    317313                resourcePowerUsageDiagrams = new HashMap<String, List<XYDataset>>(2); 
    318                 resourceAirFlowDiagrams = new HashMap<String, List<XYDataset>>(2); 
     314                resourceAirflowDiagrams = new HashMap<String, List<XYDataset>>(2); 
    319315                resourceTemperatureDiagrams = new HashMap<String, List<XYDataset>>(2); 
    320316                 
     
    353349                } 
    354350                 
    355                 PrintStream airFlowStatsFile = null; 
     351                PrintStream airflowStatsFile = null; 
    356352                try { 
    357353                        File file = new File(outputFolderName + STATS_FILE_NAME_PREFIX 
    358354                                        + simulationIdentifier + "_" 
    359355                                        + AIRFLOW_STATISTICS_OUTPUT_FILE_NAME); 
    360                         airFlowStatsFile = new PrintStream(new FileOutputStream(file)); 
     356                        airflowStatsFile = new PrintStream(new FileOutputStream(file)); 
    361357                } catch (IOException e) { 
    362                         airFlowStatsFile = null; 
     358                        airflowStatsFile = null; 
    363359                } 
    364360                 
     
    383379                } 
    384380                 
    385                 PrintStream nodesAvailabilityStatsFile = null; 
     381                /*PrintStream nodesAvailabilityStatsFile = null; 
    386382                try { 
    387383                        File file = new File(outputFolderName + STATS_FILE_NAME_PREFIX 
     
    391387                } catch (IOException e) { 
    392388                        nodesAvailabilityStatsFile = null; 
    393                 } 
     389                }*/ 
    394390                 
    395391                PrintStream metricsStatsFile = null; 
     
    413409                } 
    414410                 
    415                 pesStats = gatherPEStatsMulti(jr.getTasks()); 
    416                 peStatsPostProcessing(pesStats); 
    417                 basicResLoad = calculatePELoad(pesStats); 
     411                peStats = gatherPEStatsMulti(jobRegistry.getTasks()); 
     412                peStatsPostProcessing(peStats); 
    418413 
    419414                if (configuration.creatediagrams_gantt) { 
    420                         createPEGanttDiagram(pesStats); 
    421                 } 
    422                  
    423                 List<ComputingResource> compResources = null; 
     415                        createGanttDiagram(peStats); 
     416                } 
     417 
    424418                for(String resourceTypeName: resourceController.getComputingResourceLayers()){ 
    425419                        DCwormsAccumulator resourceEnergyAccumulator = new DCwormsAccumulator(); 
    426420                        DCwormsAccumulator maxResourceEnergyAccumulator = new DCwormsAccumulator(); 
    427421                        DCwormsAccumulator calculationsEnergyAccumulator = new DCwormsAccumulator(); 
    428                         compResources = new ArrayList<ComputingResource>(); 
     422                        List<ComputingResource> compResources = new ArrayList<ComputingResource>(); 
    429423                        for(ComputingResource compRes: resourceController.getComputingResources() ){ 
    430424                                compResources.addAll(compRes.getDescendantsByType(new CustomResourceType(resourceTypeName))); 
     
    439433                                        ResourceUsageStats resourceOccupancy = null; 
    440434                                        ResourcePowerStats energyUsage = null; 
    441                                         ResourceAirFlowStats airFlow = null; 
     435                                        ResourceAirflowStats airflow = null; 
    442436                                        ResourceTemperatureStats temperature = null; 
    443437                                        ResourceUsefulWorkStats usefulWork = null; 
     438 
    444439                                        if(type_stats.get(resourceTypeName).contains(Stats.textLoad)){ 
    445                                                 resourceOccupancy = gatherResourceOccupancyStats(compResource, pesStats); 
     440                                                resourceOccupancy = gatherResourceOccupancyStats(compResource, peStats); 
    446441                                                resourceOccupancy.setMeanValue(calculateMeanValue(resourceOccupancy)); 
    447442                                                if (resourceOccupancyStatsFile != null) { 
     
    457452                                                } 
    458453                                        } 
     454 
    459455                                        if(type_stats.get(resourceTypeName).contains(Stats.chartLoad)){ 
    460456                                                if (configuration.creatediagrams_resutilization) { 
     
    463459                                                } 
    464460                                        } 
     461 
    465462                                        if(type_stats.get(resourceTypeName).contains(Stats.textEnergy)){ 
    466463                                                energyUsage = gatherResourcePowerConsumptionStats(compResource); 
     
    548545                                                } 
    549546                                        } 
     547 
    550548                                        if(type_stats.get(resourceTypeName).contains(Stats.chartEnergy)){ 
    551549                                                if (configuration.creatediagrams_respowerusage) { 
     
    553551                                                } 
    554552                                        } 
    555                                          
    556                                         if(type_stats.get(resourceTypeName).contains(Stats.textAirFlow)){ 
    557                                                 airFlow = gatherResourceAirFlowStats(compResource); 
    558                                                 airFlow.setMeanValue(calculateMeanValue(airFlow)); 
    559                                                 airFlow.setSumValue(airFlow.getMeanValue() * (endSimulationTime - startSimulationTime) / (60 * MILLI_SEC)); 
     553 
     554                                        if(type_stats.get(resourceTypeName).contains(Stats.textAirflow)){ 
     555                                                airflow = gatherResourceAirflowStats(compResource); 
     556                                                airflow.setMeanValue(calculateMeanValue(airflow)); 
     557                                                airflow.setSumValue(airflow.getMeanValue() * (endSimulationTime - startSimulationTime) / (60 * MILLI_SEC)); 
    560558                                                 
    561559                                                EnergyExtension een = (EnergyExtension)(compResource.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION)); 
    562560                                                if(resourceController.getComputingResources().contains(compResource)) { 
    563                                                         if( een != null && een.getAirFlowProfile() != null &&  een.getPowerProfile().getEnergyEstimationPlugin() != null){ 
    564                                                                 accStats.meanAirFlow.add(airFlow.getMeanValue()); 
     561                                                        if( een != null && een.getAirflowProfile() != null &&  een.getPowerProfile().getEnergyEstimationPlugin() != null){ 
     562                                                                accStats.meanAirflow.add(airflow.getMeanValue()); 
    565563                                                        } 
    566564 
    567                                                 } else if( een != null && een.getAirFlowProfile() != null ){ 
     565                                                } else if( een != null && een.getAirflowProfile() != null ){ 
    568566                                                        ComputingResource parent = compResource.getParent(); 
    569567                                                        een = (EnergyExtension)(parent.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION)); 
    570568                                                        boolean top = true; 
    571569                                                        while(parent != null){ 
    572                                                                 if(een != null &&  een.getAirFlowProfile() != null) { 
     570                                                                if(een != null &&  een.getAirflowProfile() != null) { 
    573571                                                                        top = false; 
    574572                                                                        break; 
     
    577575                                                        } 
    578576                                                        if(top == true){ 
    579                                                                 accStats.meanAirFlow.add(airFlow.getMeanValue()); 
     577                                                                accStats.meanAirflow.add(airflow.getMeanValue()); 
    580578                                                        } 
    581579                                                } 
    582                                                 if (airFlowStatsFile != null) { 
    583                                                         Object txt = airFlow.serialize(serializer); 
    584                                                         airFlowStatsFile.print(txt); 
     580                                                if (airflowStatsFile != null) { 
     581                                                        Object txt = airflow.serialize(serializer); 
     582                                                        airflowStatsFile.print(txt); 
    585583                                                } 
    586584                                                 
    587585                                                for(Device device: compResource.getResourceCharacteristic().getDevices()){ 
    588                                                         ResourceAirFlowStats deviceAirFlow = gatherResourceAirFlowStats(device); 
    589                                                         deviceAirFlow.setMeanValue(calculateMeanValue(deviceAirFlow)); 
    590                                                         deviceAirFlow.setSumValue(deviceAirFlow.getMeanValue() * (endSimulationTime - startSimulationTime) / (60 * MILLI_SEC)); 
     586                                                        ResourceAirflowStats deviceAirflow = gatherResourceAirflowStats(device); 
     587                                                        deviceAirflow.setMeanValue(calculateMeanValue(deviceAirflow)); 
     588                                                        deviceAirflow.setSumValue(deviceAirflow.getMeanValue() * (endSimulationTime - startSimulationTime) / (60 * MILLI_SEC)); 
    591589                                                         
    592590                                                        if (deviceStatsFile != null) { 
    593                                                                 Object txt = deviceAirFlow.serialize(serializer); 
     591                                                                Object txt = deviceAirflow.serialize(serializer); 
    594592                                                                deviceStatsFile.print(txt); 
    595593                                                        } 
     
    597595                                                        if(ArrayUtils.contains(configuration.compResForAirflowChart, device.getType().getName())){ 
    598596                                                                if (configuration.creatediagrams_resairflow) { 
    599                                                                         createResourceAirFlowDiagramData(deviceAirFlow); 
     597                                                                        createResourceAirflowDiagramData(deviceAirflow); 
    600598                                                                } 
    601599                                                        } 
    602600                                                } 
    603601                                        } 
    604                                         if(type_stats.get(resourceTypeName).contains(Stats.chartAirFlow)){ 
     602 
     603                                        if(type_stats.get(resourceTypeName).contains(Stats.chartAirflow)){ 
    605604 
    606605                                                if (configuration.creatediagrams_resairflow) { 
    607                                                         createResourceAirFlowDiagramData(airFlow); 
     606                                                        createResourceAirflowDiagramData(airflow); 
    608607                                                } 
    609608                                        } 
    610                                          
     609 
    611610                                        if(type_stats.get(resourceTypeName).contains(Stats.textTemperature)){ 
    612611                                                temperature = gatherResourceTemperatureStats(compResource); 
     
    657656                                                }                                                
    658657                                        } 
     658 
    659659                                        if(type_stats.get(resourceTypeName).contains(Stats.chartTemperature)){ 
    660660                                                if (configuration.creatediagrams_restemperature) { 
     
    662662                                                } 
    663663                                        } 
    664                                          
     664 
    665665                                        if(type_stats.get(resourceTypeName).contains(Stats.textLoad)){ 
    666666                                                usefulWork = gatherResourceUsefulWorkStats(compResource); 
     
    670670                                                } 
    671671                                        } 
    672                                          
    673                                          
    674                                         if (nodesAvailabilityStatsFile != null) { 
     672                                        /*if (nodesAvailabilityStatsFile != null) { 
    675673                                                ResourceAvailabilityStats ras = new ResourceAvailabilityStats(compResource.getFullName(), compResource.getType(), "availableNodes", compResource.getChildren().size(), endSimulationTime); 
    676674                                                Object txt = ras.serialize(serializer); 
     
    679677                                                txt = ras.serialize(serializer); 
    680678                                                nodesAvailabilityStatsFile.print(txt); 
    681                                         } 
     679                                        }*/ 
    682680                                         
    683681                                } 
     
    708706                        temperatureStatsFile.close(); 
    709707                } 
    710                 if (airFlowStatsFile != null) { 
    711                         airFlowStatsFile.close(); 
     708                if (airflowStatsFile != null) { 
     709                        airflowStatsFile.close(); 
    712710                } 
    713711                if (energyStatsFile != null) { 
     
    728726                } 
    729727                 
    730                 if (nodesAvailabilityStatsFile != null) { 
     728                /*if (nodesAvailabilityStatsFile != null) { 
    731729                        nodesAvailabilityStatsFile.close(); 
    732                 } 
     730                }*/ 
    733731                 
    734732                if (metricsStatsFile != null) { 
     
    739737 
    740738         
    741         private void peStatsPostProcessing(Map<String, List<ResStat>> basicResStats){ 
     739        private void peStatsPostProcessing(Map<ComputingResource, List<ResStat>> basicResStats){ 
    742740                ResourceType resType = null; 
    743741 
    744                 for(String key: basicResStats.keySet()){ 
    745                         List<ResStat> resStats = basicResStats.get(key); 
     742                for(ComputingResource pe: basicResStats.keySet()){ 
     743                        List<ResStat> resStats = basicResStats.get(pe); 
    746744                        resType = resStats.get(0).getResType(); 
    747745                        break; 
     
    757755                } 
    758756                for(ComputingResource resource: resources){ 
    759                         if(!basicResStats.containsKey(resource.getFullName())){ 
    760                                 basicResStats.put(resource.getFullName(), new ArrayList<ResStat>()); 
    761                         } 
    762                 } 
    763         } 
    764          
    765         private Map<String, List<ResStat>> gatherPEStats(ExecutablesList executables) { 
    766                  
    767                 Map<String, List<ResStat>> basicResStats = new TreeMap<String, List<ResStat>>(new MapPEIdComparator()); 
     757                        if(!basicResStats.containsKey(resource)){ 
     758                                basicResStats.put(resource, new ArrayList<ResStat>()); 
     759                        } 
     760                } 
     761        } 
     762         
     763        //TO DELETE 
     764        /*private Map<ComputingResource, List<ResStat>> gatherPEStats(ExecutablesList executables) { 
     765                 
     766                Map<ComputingResource, List<ResStat>> basicResStats = new TreeMap<ComputingResource, List<ResStat>>(new peIdComparator()); 
    768767                for (ExecTask execTask:executables) { 
    769768                        Executable exec = (Executable) execTask; 
     
    787786                                        ResStat resStat = new ResStat(peName, pe.getType(), startDate, endDate, appID); 
    788787                                         
    789                                         List<ResStat> resStats = basicResStats.get(peName); 
     788                                        List<ResStat> resStats = basicResStats.get(pe); 
    790789                                        if (resStats == null) { 
    791790                                                resStats = new ArrayList<ResStat>(); 
    792791                                                resStats.add(resStat); 
    793                                                 basicResStats.put(peName, resStats); 
     792                                                basicResStats.put(pe, resStats); 
    794793                                        } else { 
    795794                                                resStats.add(resStat); 
     
    798797                                        String uniqueTaskID = getUniqueTaskId(execTask); 
    799798 
    800                                         Set<ComputingResource> peNames = task_processorsMap.get(uniqueTaskID); 
     799                                        Set<ComputingResource> peNames = taskToPEMap.get(uniqueTaskID); 
    801800                                        if (peNames == null) { 
    802801                                                peNames = new HashSet<ComputingResource>(); 
    803802                                                peNames.add(pe); 
    804                                                 task_processorsMap.put(uniqueTaskID, peNames); 
     803                                                taskToPEMap.put(uniqueTaskID, peNames); 
    805804                                        } else { 
    806805                                                peNames.add(pe); 
     
    827826                } 
    828827                return basicResStats; 
    829         } 
    830          
    831         private Map<String, List<ResStat>> gatherPEStatsMulti(ExecutablesList executables) { 
    832                  
    833                 Map<String, List<ResStat>> basicResStats = new TreeMap<String, List<ResStat>>(new MapPEIdComparator()); 
     828        }*/ 
     829         
     830        private Map<ComputingResource, List<ResStat>> gatherPEStatsMulti(ExecutablesList executables) { 
     831                 
     832                Map<ComputingResource, List<ResStat>> basicResStats = new TreeMap<ComputingResource, List<ResStat>>(new peIdComparator()); 
    834833                for (ExecTask execTask:executables) { 
    835834                        Executable exec = (Executable) execTask; 
     
    839838                                continue; 
    840839 
    841                         for(int i = 0; i < resourceHistory .size(); i++){ 
     840                        for(int i = 0; i < resourceHistory.size(); i++){ 
    842841                                ResourceItem resHistItem = resourceHistory.get(i); 
    843842                                Map<ResourceUnitName, ResourceUnit> res = resHistItem.getResourceUnits(); 
     
    875874                                                                ResStat resStat = new ResStat(peName, pe.getType(), startDate, endDate, appID); 
    876875                                                                 
    877                                                                 List<ResStat> resStats = basicResStats.get(peName); 
     876                                                                List<ResStat> resStats = basicResStats.get(pe); 
    878877                                                                if (resStats == null) { 
    879878                                                                        resStats = new ArrayList<ResStat>(); 
    880879                                                                        resStats.add(resStat); 
    881                                                                         basicResStats.put(peName, resStats); 
     880                                                                        basicResStats.put(pe, resStats); 
    882881                                                                } else { 
    883882                                                                        resStats.add(resStat); 
     
    886885                                                                String uniqueTaskID = getUniqueTaskId(execTask); 
    887886 
    888                                                                 Set<ComputingResource> peNames = task_processorsMap.get(uniqueTaskID); 
     887                                                                Set<ComputingResource> peNames = taskToPEMap.get(uniqueTaskID); 
    889888                                                                if (peNames == null) { 
    890889                                                                        peNames = new HashSet<ComputingResource>(); 
    891890                                                                        peNames.add(pe); 
    892                                                                         task_processorsMap.put(uniqueTaskID, peNames); 
     891                                                                        taskToPEMap.put(uniqueTaskID, peNames); 
    893892                                                                } else { 
    894893                                                                        peNames.add(pe); 
     
    910909                                                                         
    911910                                                                } 
    912                                                                  
    913911                                                        } 
    914912                                                }  
     
    949947        } 
    950948         
    951          
    952         private ResourceUsageStats gatherResourceOccupancyStats(ComputingResource resource, Map<String, List<ResStat>> basicStats) { 
     949        //TO DELETE 
     950        /*private ResourceUsageStats gatherResourceOccupancyStatsOld(ComputingResource resource, Map<String, List<ResStat>> basicStats) { 
    953951                String usageType = null; 
    954                 if(resource.getResourceCharacteristic().getParameters().get("load-sensor")!= null){ 
     952                if(resource.getResourceCharacteristic().getParameters().get("load-sensor") != null){ 
    955953                        usageType = resource.getResourceCharacteristic().getParameters().get("load-sensor").get(0).getContent(); 
    956954                } 
    957955                ResourceUsageStats usageStats = new ResourceUsageStats(resource.getFullName(), resource.getType(), usageType); 
    958956                int cnt = 0; 
     957                System.out.println("a: " + System.currentTimeMillis()); 
    959958                for(String resName: basicStats.keySet()){ 
    960959 
     
    964963                        } 
    965964                } 
     965                System.out.println("b: " + System.currentTimeMillis()); 
    966966                for(Long key: usageStats.getHistory().keySet()){ 
    967967                        Double value = usageStats.getHistory().get(key)/cnt; 
     
    971971                return usageStats; 
    972972        } 
    973          
    974         private ResourceUsageStats gatherResourceOccupancyStatsNew(ComputingResource resource, Map<String, List<ResStat>> basicStats) { 
     973        */ 
     974        private ResourceUsageStats gatherResourceOccupancyStats(ComputingResource compRes, Map<ComputingResource, List<ResStat>> basicStats) { 
    975975 
    976976                String usageType = null; 
    977                 if(resource.getResourceCharacteristic().getParameters().get("load-sensor")!= null){ 
    978                         usageType = resource.getResourceCharacteristic().getParameters().get("load-sensor").get(0).getContent(); 
    979                 } 
    980                 ResourceUsageStats usageStats = new ResourceUsageStats(resource.getFullName(), resource.getType(), usageType); 
     977                if(compRes.getResourceCharacteristic().getParameters().get("load-sensor")!= null){ 
     978                        usageType = compRes.getResourceCharacteristic().getParameters().get("load-sensor").get(0).getContent(); 
     979                } 
     980                ResourceUsageStats usageStats = new ResourceUsageStats(compRes.getFullName(), compRes.getType(), usageType); 
    981981                int cnt = 0; 
    982                  
    983                 ResourceType resType = null; 
    984  
    985                 for(String key: basicStats.keySet()){ 
    986                         List<ResStat> resStats = basicStats.get(key); 
    987                         resType = resStats.get(0).getResType(); 
    988                         break; 
    989                 } 
    990                 List<ComputingResource> resources = null; 
    991                 try { 
    992                         resources = new ArrayList<ComputingResource>(); 
    993                         for(ComputingResource compRes: resourceController.getComputingResources()){ 
    994                                 resources.addAll(compRes.getDescendantsByType(resType)); 
    995                         } 
    996                 } catch (Exception e) { 
    997  
    998                 } 
    999                  
    1000                 List<String> resourcesNames = new ArrayList<String>(resources.size()); 
    1001                 for(ComputingResource compRes: resources){ 
    1002                         resourcesNames.add(compRes.getFullName()); 
    1003                 } 
    1004                  
    1005                  
    1006                 for(String resName: basicStats.keySet()){ 
    1007                                 if( resourcesNames.contains(resName)  || resource.getFullName().compareTo(resName) == 0){ 
    1008                                         createResourceLoadData(usageStats, basicStats.get(resName)); 
     982 
     983                if(basicStats.containsKey(compRes)){ 
     984                        createResourceLoadData(usageStats, basicStats.get(compRes)); 
     985                        cnt++; 
     986                } else { 
     987                        for(ComputingResource pe: basicStats.keySet()){ 
     988                                if(compRes.contains(pe)){ 
     989                                        createResourceLoadData(usageStats, basicStats.get(pe)); 
    1009990                                        cnt++; 
    1010991                                } 
    1011                 } 
     992                        } 
     993                } 
     994 
    1012995                for(Long key: usageStats.getHistory().keySet()){ 
    1013996                        Double value = usageStats.getHistory().get(key)/cnt; 
     
    10221005                int usedResources = 0; 
    10231006                for(ComputingResource compResource: resource.getChildren()){ 
    1024                         double meanLoad = calculateMeanValue(gatherResourceOccupancyStats(compResource, pesStats)); 
     1007                        double meanLoad = calculateMeanValue(gatherResourceOccupancyStats(compResource, peStats)); 
    10251008                        if(meanLoad > 0){ 
    10261009                                usedResources++; 
     
    10341017                String usageType = "usefulWork"; 
    10351018                double usefulWork = 0; 
    1036                 JobRegistry jr = new JobRegistryImpl(compResource.getFullName()); 
     1019                JobRegistry jr = new JobRegistryImpl(compResource); 
    10371020                for(ExecTask task: jr.getFinishedTasks()){ 
    10381021                        usefulWork = usefulWork + task.getExecutionProfile().getUsefulWork(); 
     
    11621145        } 
    11631146         
    1164         private ResourceAirFlowStats gatherResourceAirFlowStats(PhysicalResource resource) { 
     1147        private ResourceAirflowStats gatherResourceAirflowStats(PhysicalResource resource) { 
    11651148 
    11661149                String usageType = null; 
     
    11681151                        usageType = resource.getResourceCharacteristic().getParameters().get("airflow_volume-sensor").get(0).getContent(); 
    11691152                } 
    1170                 ResourceAirFlowStats resAirFlow = new ResourceAirFlowStats(resource.getFullName(), resource.getType(), usageType); 
    1171                 Map<Long, Double> airFlow = resAirFlow.getHistory(); 
     1153                ResourceAirflowStats resAirflow = new ResourceAirflowStats(resource.getFullName(), resource.getType(), usageType); 
     1154                Map<Long, Double> airflow = resAirflow.getHistory(); 
    11721155                 
    11731156                ExtensionList extensionList = resource.getExtensionList(); 
     
    11761159                                if (extension.getType() == ExtensionType.ENERGY_EXTENSION) { 
    11771160                                        EnergyExtension ee = (EnergyExtension)extension; 
    1178                                         if(ee.getAirFlowProfile() == null) 
     1161                                        if(ee.getAirflowProfile() == null) 
    11791162                                                break; 
    1180                                         List<AirflowValue> airFlowHistory = ee.getAirFlowProfile().getAirflowHistory(); 
    1181                                         if(airFlowHistory.size() == 0) 
     1163                                        List<AirflowValue> airflowHistory = ee.getAirflowProfile().getAirflowHistory(); 
     1164                                        if(airflowHistory.size() == 0) 
    11821165                                                break; 
    11831166                                        long endSimulationTime = DateTimeUtilsExt.currentTimeMillis(); 
    1184                                         airFlowHistory.add(new AirflowValue(endSimulationTime, ee.getAirFlowProfile().getAirflowHistory().get(ee.getAirFlowProfile().getAirflowHistory().size()-1).getValue())); 
    1185                                         for(AirflowValue af:airFlowHistory){ 
    1186                                                 airFlow.put(af.getTimestamp(), af.getValue()); 
     1167                                        airflowHistory.add(new AirflowValue(endSimulationTime, ee.getAirflowProfile().getAirflowHistory().get(ee.getAirflowProfile().getAirflowHistory().size()-1).getValue())); 
     1168                                        for(AirflowValue af:airflowHistory){ 
     1169                                                airflow.put(af.getTimestamp(), af.getValue()); 
    11871170                                        } 
    11881171                                } 
    11891172                        } 
    11901173                } 
    1191                 return resAirFlow; 
     1174                return resAirflow; 
    11921175        } 
    11931176         
     
    12931276        } 
    12941277 
    1295         private void createResourceAirFlowDiagramData(ResourceDynamicStats airFlowStats) { 
    1296  
    1297                 XYDataset dataset = createResourceChartDataSet(airFlowStats, 
     1278        private void createResourceAirflowDiagramData(ResourceDynamicStats airflowStats) { 
     1279 
     1280                XYDataset dataset = createResourceChartDataSet(airflowStats, 
    12981281                                startSimulationTime, endSimulationTime); 
    12991282                 
    1300                 List<XYDataset> airFlowDiagramData = resourceAirFlowDiagrams.get(airFlowStats.getResourceType().getName()); 
    1301                 if(airFlowDiagramData == null){ 
    1302                         airFlowDiagramData = new ArrayList<XYDataset>(); 
    1303                         airFlowDiagramData.add(dataset); 
    1304                         resourceAirFlowDiagrams.put(airFlowStats.getResourceType().getName(), airFlowDiagramData); 
     1283                List<XYDataset> airflowDiagramData = resourceAirflowDiagrams.get(airflowStats.getResourceType().getName()); 
     1284                if(airflowDiagramData == null){ 
     1285                        airflowDiagramData = new ArrayList<XYDataset>(); 
     1286                        airflowDiagramData.add(dataset); 
     1287                        resourceAirflowDiagrams.put(airflowStats.getResourceType().getName(), airflowDiagramData); 
    13051288                } else { 
    1306                         airFlowDiagramData.add(dataset); 
     1289                        airflowDiagramData.add(dataset); 
    13071290                } 
    13081291        } 
     
    13991382                chartName = "Air flow diagram for " 
    14001383                        + DataCenterWorkloadSimulator.SIMULATOR_NAME; 
    1401                 JFreeChart resourceAirFlowDiagram = null; 
     1384                JFreeChart resourceAirflowDiagram = null; 
    14021385                if (configuration.creatediagrams_resairflow) { 
    14031386                        String axisName = "AIR FLOW [m^3/min]"; 
    1404                         for(String resType: resourceAirFlowDiagrams.keySet()){ 
    1405                                 resourceAirFlowDiagram = getResourceDynamicDiagram(resourceAirFlowDiagrams.get(resType), simulationTime, chartName, 
     1387                        for(String resType: resourceAirflowDiagrams.keySet()){ 
     1388                                resourceAirflowDiagram = getResourceDynamicDiagram(resourceAirflowDiagrams.get(resType), simulationTime, chartName, 
    14061389                                                subtitle, axisName); 
    1407                                 if (!saveXYPlotChart(resourceAirFlowDiagram, fileName + "Airflow_" + resType)) 
     1390                                if (!saveXYPlotChart(resourceAirflowDiagram, fileName + "Airflow_" + resType)) 
    14081391                                        return false; 
    14091392                        } 
     
    15241507        } 
    15251508         
    1526         private void createPEGanttDiagram(Map<String,List<ResStat>> basicResStats) { 
    1527                 peGanttMap = new HashMap<String, TimetableEventSource>(); 
    1528                 taskGanttMap = new HashMap<String, TimetableEventGroup>(); 
    1529                 for(String peName: basicResStats.keySet()){ 
    1530                         TimetableEventSource pe = new TimetableEventSource(peName); 
    1531                         ganttDiagramTimetable.addEventSource(pe); 
    1532                         peGanttMap.put(peName, pe); 
    1533                         for(ResStat resStat: basicResStats.get(peName)){ 
    1534  
    1535                                 pe = peGanttMap.get(resStat.getPeName()); 
    1536                                 if(pe == null){ 
     1509        private void createGanttDiagram(Map<ComputingResource, List<ResStat>> basicResStats) { 
     1510                Map<String, TimetableEventSource> peGanttMap = new HashMap<String, TimetableEventSource>(); 
     1511                Map<String, TimetableEventGroup> taskGanttMap = new HashMap<String, TimetableEventGroup>(); 
     1512                for(ComputingResource pe: basicResStats.keySet()){ 
     1513                        TimetableEventSource peES = new TimetableEventSource(pe.getFullName()); 
     1514                        ganttDiagramTimetable.addEventSource(peES); 
     1515                        peGanttMap.put(pe.getFullName(), peES); 
     1516                        for(ResStat resStat: basicResStats.get(pe)){ 
     1517 
     1518                                peES = peGanttMap.get(resStat.getPeName()); 
     1519                                if(peES == null){ 
    15371520                                        //pe = new TimetableEventSource(resStat.getPeName()); 
    15381521                                //      ganttDiagramPeTimetable.addEventSource(pe); 
    15391522                                //      peGanttMap.put(resStat.getPeName(), pe); 
    15401523                                } 
    1541                                 TimetableEventGroup task = taskGanttMap.get(resStat.getTaskID()); 
     1524                                TimetableEventGroup taskEG = taskGanttMap.get(resStat.getTaskID()); 
    15421525                                long startDate = resStat.getStartDate(); 
    15431526                                long endDate = resStat.getEndDate(); 
    1544                                 if (task == null) { 
    1545                                         task = new TimetableEventGroup(resStat.getTaskID()); 
    1546                                         taskGanttMap.put(resStat.getTaskID(), task); 
    1547                                         ganttDiagramTimetable.addEventGroup(task); 
     1527                                if (taskEG == null) { 
     1528                                        taskEG = new TimetableEventGroup(resStat.getTaskID()); 
     1529                                        taskGanttMap.put(resStat.getTaskID(), taskEG); 
     1530                                        ganttDiagramTimetable.addEventGroup(taskEG); 
    15481531                                } 
    1549                                 ganttDiagramTimetable.addEvent(pe, task, 
     1532                                ganttDiagramTimetable.addEvent(peES, taskEG, 
    15501533                                                new FixedMillisecond(startDate), new FixedMillisecond(endDate)); 
    15511534                        } 
     
    15561539        //TO DO 
    15571540        private void createAccumulatedResourceSimulationStatistic() { 
     1541                Map<ComputingResource, Double> basicResLoad = calculatePELoad(peStats); 
    15581542 
    15591543                List<ComputingResource> resources = resourceController.getComputingResources(); 
     
    15751559        } 
    15761560 
    1577         private Map<String, Double> calculatePELoad(Map<String, List<ResStat>> basicResStats){ 
    1578                 Map<String, Double> peLoad = new HashMap<String, Double>(); 
    1579                 for(String resName: basicResStats.keySet()){ 
    1580                         List<ResStat> resStats = basicResStats.get(resName); 
     1561        private Map<ComputingResource, Double> calculatePELoad(Map<ComputingResource, List<ResStat>> basicResStats){ 
     1562                Map<ComputingResource, Double> peLoad = new HashMap<ComputingResource, Double>(); 
     1563                for(ComputingResource compRes: basicResStats.keySet()){ 
     1564                        List<ResStat> resStats = basicResStats.get(compRes); 
    15811565                        double sum = 0; 
    15821566                        for(ResStat resStat:resStats){ 
     
    15841568                        } 
    15851569                        double load = sum / (endSimulationTime - startSimulationTime); 
    1586                         peLoad.put(resName, load); 
     1570                        peLoad.put(compRes, load); 
    15871571                } 
    15881572                return peLoad; 
    15891573        } 
    15901574         
    1591         private  Double calculateResourceLoad(ComputingResource resource, Map<String, Double> peLoad ){ 
     1575        private  Double calculateResourceLoad(ComputingResource compRes, Map<ComputingResource, Double> peLoad ){ 
    15921576                int peCnt = 0; 
    15931577                double sum = 0; 
    1594                 for(String resName: peLoad.keySet()){ 
    1595  
    1596                         if(resource.getDescendantByName(resName) != null || resource.getFullName().compareTo(resName) == 0){ 
    1597                                 Double load = peLoad.get(resName); 
     1578                for(ComputingResource pe: peLoad.keySet()){ 
     1579 
     1580                        if(compRes.contains(pe)){ 
     1581                                Double load = peLoad.get(pe); 
    15981582                                sum += load; 
    15991583                                peCnt++; 
     
    16741658                        Job job = (Job) jobs.get(i); 
    16751659 
    1676                         List<ExecTask> execList = jr.getTasks().getExecutables(job.getId()); 
     1660                        List<ExecTask> execList = jobRegistry.getTasks().getExecutables(job.getId()); 
    16771661                        List<TaskStats> taskStatsList = new ArrayList<TaskStats>(); 
    16781662 
    1679                         this.serializer.setFieldSeparator(TASK_SEPARATOR); 
     1663                        this.serializer.setFieldSeparator(SEPARATOR); 
    16801664 
    16811665                        for (int j = 0; j < execList.size(); j++) { 
     
    17061690                        if (configuration.createjobsstatistics && taskStatsList.size() > 0) { 
    17071691 
    1708                                 this.serializer.setFieldSeparator(JOB_SEPARATOR); 
     1692                                this.serializer.setFieldSeparator(SEPARATOR); 
    17091693                                JobStats jobStats = createJobStats(taskStatsList); 
    17101694                                if (jobStatsFile != null) { 
     
    17561740                TaskStats taskStats = new TaskStats(task, startSimulationTime); 
    17571741                String uniqueTaskID = getUniqueTaskId(task); 
    1758                 taskStats.setProcessors(task_processorsMap.get(uniqueTaskID)); 
     1742                taskStats.setProcessors(taskToPEMap.get(uniqueTaskID)); 
    17591743                return taskStats; 
    17601744        } 
     
    20162000        } 
    20172001         
    2018         private static class MapPEIdComparator implements Comparator<String> { 
    2019  
    2020                 public int compare(String o1, String o2)  { 
     2002        private static class peIdComparator implements Comparator<ComputingResource> { 
     2003 
     2004                public int compare(ComputingResource o1, ComputingResource o2)  { 
    20212005                        Integer o1int = 0; 
    20222006                        Integer o2int = 0; 
    2023                         String o1string; 
     2007                        String o1string = null; 
    20242008                        String o2string = null; 
    2025  
    2026                         if(o1.contains("_")){ 
    2027                                 o1string = o1.substring(0, o1.lastIndexOf("_")); 
    2028                                 o1int = Integer.parseInt(o1.substring(o1.lastIndexOf("_")+1)); 
    2029                         } else { 
    2030                                 o1string = o1; 
    2031                         } 
    2032                          
    2033                         if(o2.contains("_")){ 
    2034                                 o2string = o2.substring(0, o2.lastIndexOf("_")); 
    2035                                 o2int = Integer.parseInt(o2.substring(o2.lastIndexOf("_")+1)); 
    2036                         }else { 
    2037                                 o2string = o2; 
    2038                         } 
     2009                        try { 
     2010                                if(o1.getFullName().contains("_")){ 
     2011                                        o1string = o1.getFullName().substring(0, o1.getFullName().lastIndexOf("_")); 
     2012                                        o1int = Integer.parseInt(o1.getFullName().substring(o1.getFullName().lastIndexOf("_") + 1)); 
     2013                                } else { 
     2014                                        o1string = o1.getFullName(); 
     2015                                } 
     2016                                 
     2017                                if(o2.getFullName().contains("_")){ 
     2018                                        o2string = o2.getFullName().substring(0, o2.getFullName().lastIndexOf("_")); 
     2019                                        o2int = Integer.parseInt(o2.getFullName().substring(o2.getFullName().lastIndexOf("_") + 1)); 
     2020                                }else { 
     2021                                        o2string = o2.getFullName(); 
     2022                                } 
     2023                        } catch (Exception e) { 
     2024                                o1int = 0; 
     2025                                o2int = 0; 
     2026                                o1string = o1.getFullName(); 
     2027                                o2string = o2.getFullName(); 
     2028                        } 
     2029 
    20392030 
    20402031                        if(o1int.compareTo(o2int) != 0) 
     
    20772068 
    20782069        public ResStat(String peName, long startDate, long endDate, String taskID) { 
    2079                 super(); 
    20802070                this.startDate = startDate; 
    20812071                this.endDate = endDate; 
     
    20902080        } 
    20912081        public ResStat(String peName, ResourceType resType, long startDate, long endDate, String taskID) { 
    2092                 super(); 
    20932082                this.peName = peName; 
    20942083                this.resType = resType; 
     
    21162105        textEnergy, 
    21172106        chartEnergy, 
    2118         textAirFlow, 
    2119         chartAirFlow, 
     2107        textAirflow, 
     2108        chartAirflow, 
    21202109        textTemperature, 
    21212110        chartTemperature, 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/GSSAccumulatorsStats.java

    r1396 r1434  
    1010        public DCwormsAccumulator meanQueueLength; 
    1111        public DCwormsAccumulator meanEnergyUsage; 
    12         public DCwormsAccumulator meanAirFlow; 
     12        public DCwormsAccumulator meanAirflow; 
    1313        public DCwormsAccumulator meanTemperature; 
    1414 
     
    3232                meanQueueLength = new DCwormsAccumulator(); 
    3333                meanEnergyUsage = new DCwormsAccumulator();  
    34                 meanAirFlow = new DCwormsAccumulator();  
     34                meanAirflow = new DCwormsAccumulator();  
    3535                meanTemperature = new DCwormsAccumulator();  
    3636                 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/ResourceAirflowStats.java

    r1207 r1434  
    44import simulator.stats.implementation.out.StatsSerializer; 
    55 
    6 public class ResourceAirFlowStats extends ResourceDynamicStats implements StatsInterface{ 
     6public class ResourceAirflowStats extends ResourceDynamicStats implements StatsInterface{ 
    77 
    88        protected double sumValue; 
    99         
    10         private String[] headers = { "resourceName", "timestamp", "airFlow" }; 
     10        private String[] headers = { "resourceName", "timestamp", "airflow" }; 
    1111         
    12         public ResourceAirFlowStats (String resourceName, ResourceType resourceType, String usageType) { 
     12        public ResourceAirflowStats (String resourceName, ResourceType resourceType, String usageType) { 
    1313                super(resourceName, resourceType, usageType); 
    1414                if(usageType == null){ 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/CoolEmAllStringSerializer.java

    r1396 r1434  
    1111import schedframe.resources.StandardResourceType; 
    1212import simulator.stats.implementation.MetricsStats; 
    13 import simulator.stats.implementation.ResourceAirFlowStats; 
     13import simulator.stats.implementation.ResourceAirflowStats; 
    1414import simulator.stats.implementation.ResourceAvailabilityStats; 
    1515import simulator.stats.implementation.ResourceHistoryStats; 
     
    139139        } 
    140140 
    141         public Object visit(ResourceAirFlowStats resourceAirFlowStats) { 
     141        public Object visit(ResourceAirflowStats resourceAirFlowStats) { 
    142142                Map<Long, Double> resourceAirFlow = resourceAirFlowStats.getHistory(); 
    143143                //String nodeMetricName = "airflow_volume"; 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/StatsSerializer.java

    r1207 r1434  
    55import simulator.stats.implementation.JobStats; 
    66import simulator.stats.implementation.MetricsStats; 
    7 import simulator.stats.implementation.ResourceAirFlowStats; 
     7import simulator.stats.implementation.ResourceAirflowStats; 
    88import simulator.stats.implementation.ResourceAvailabilityStats; 
    99import simulator.stats.implementation.ResourceHistoryStats; 
     
    3434        public Object visit(ResourcePowerStats arg); 
    3535 
    36         public Object visit(ResourceAirFlowStats arg); 
     36        public Object visit(ResourceAirflowStats arg); 
    3737         
    3838        public Object visit(ResourceTemperatureStats arg); 
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/out/StringSerializer.java

    r1207 r1434  
    1212import simulator.stats.implementation.JobStats; 
    1313import simulator.stats.implementation.MetricsStats; 
    14 import simulator.stats.implementation.ResourceAirFlowStats; 
     14import simulator.stats.implementation.ResourceAirflowStats; 
    1515import simulator.stats.implementation.ResourceAvailabilityStats; 
    1616import simulator.stats.implementation.ResourceHistoryStats; 
     
    387387        } 
    388388 
    389         public Object visit(ResourceAirFlowStats resourceAirFlowStats) { 
     389        public Object visit(ResourceAirflowStats resourceAirFlowStats) { 
    390390                Map<Long, Double> resourceAirFlow = resourceAirFlowStats.getHistory(); 
    391391                String metricName = "airFlow"; 
Note: See TracChangeset for help on using the changeset viewer.