Ignore:
Timestamp:
11/28/16 14:30:31 (8 years ago)
Author:
wojtekp
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • DCWoRMS/branches/coolemall/src/simulator/stats/implementation/DCWormsStatistics.java

    r1461 r1597  
    420420                        DCwormsAccumulator maxResourceEnergyAccumulator = new DCwormsAccumulator(); 
    421421                        DCwormsAccumulator calculationsEnergyAccumulator = new DCwormsAccumulator(); 
     422                        //DCwormsAccumulator tempAboveThresholdAccumulator = new DCwormsAccumulator(); 
     423                        //DCwormsAccumulator tempAboveThresholdAccumulatorH = new DCwormsAccumulator(); 
    422424                        List<ComputingResource> compResources = new ArrayList<ComputingResource>(); 
    423425                        for(ComputingResource compRes: resourceController.getComputingResources() ){ 
     
    613615                                                temperature.setMeanValue(calculateMeanValue(temperature)); 
    614616                                                temperature.setSumValue(temperature.getMeanValue() * (endSimulationTime - startSimulationTime) / (3600 * MILLI_SEC)); 
    615                                                  
     617                                                /*if(resourceTypeName.equals("Processor")){ 
     618                                                        tempAboveThresholdAccumulator.add(calculateTempExcTime(temperature)); 
     619                                                        tempAboveThresholdAccumulatorH.add(calculateTempExcTimeH(temperature));                                                  
     620                                                }*/ 
    616621                                                EnergyExtension een = (EnergyExtension)(compResource.getExtensionList().getExtension(ExtensionType.ENERGY_EXTENSION)); 
    617622                                                if(resourceController.getComputingResources().contains(compResource)) { 
     
    684689                                metCalc.addMetricsData(resourceTypeName, resourceEnergyAccumulator); 
    685690                                metCalc.addMetricsData(resourceTypeName + "_MAX", maxResourceEnergyAccumulator); 
     691                                /*if(resourceTypeName.equals("Processor")){ 
     692                                        metCalc.addMetricsData(resourceTypeName + "_TEMPEXC", tempAboveThresholdAccumulator); 
     693                                        metCalc.addMetricsData(resourceTypeName + "_TEMPHEXC", tempAboveThresholdAccumulatorH);                                  
     694                                }*/ 
    686695                        } 
    687696                } 
     
    737746        } 
    738747 
     748         
     749        /*private double calculateTempExcTime(ResourceTemperatureStats temperature) { 
     750                double overall = 0; 
     751                long prevt = 0; 
     752                //double prevTemp; 
     753                boolean exceeded = false; 
     754                for(Long t: temperature.getHistory().keySet()){ 
     755                        if(exceeded){ 
     756                                overall = overall + (t - prevt); 
     757                                exceeded = false; 
     758                        } 
     759                        double temp = temperature.getHistory().get(t); 
     760                        if(temp > EnvironmentConditions.i5_statsTThres){ 
     761                                prevt = t; 
     762                                exceeded = true; 
     763                                //prevTemp = temp; 
     764                        } 
     765                } 
     766                return overall; 
     767        } 
     768        private double calculateTempExcTimeH(ResourceTemperatureStats temperature) { 
     769                double overall = 0; 
     770                long prevt = 0; 
     771                //double prevTemp; 
     772                boolean exceeded = false; 
     773                for(Long t: temperature.getHistory().keySet()){ 
     774                        if(exceeded){ 
     775                                overall = overall + (t - prevt); 
     776                                exceeded = false; 
     777                        } 
     778                        double temp = temperature.getHistory().get(t); 
     779                        if(temp > EnvironmentConditions.i5_statsTThresH){ 
     780                                prevt = t; 
     781                                exceeded = true; 
     782                                //prevTemp = temp; 
     783                        } 
     784                } 
     785                return overall; 
     786        }*/ 
    739787         
    740788        private void peStatsPostProcessing(Map<ComputingResource, List<ResStat>> basicResStats){ 
     
    10991147                                        long endSimulationTime = DateTimeUtilsExt.currentTimeMillis(); 
    11001148 
    1101                                         loadHistory.add(new MeasurementHistory(endSimulationTime, le.getLoadProfile().getUtilizationHistory().get(le.getLoadProfile().getUtilizationHistory().size() - 1).getValue()/100)); 
     1149                                        loadHistory.add(new MeasurementHistory(endSimulationTime, le.getLoadProfile().getUtilizationHistory().get(le.getLoadProfile().getUtilizationHistory().size() - 1).getValue())); 
    11021150                                        for(MeasurementHistory l:loadHistory){ 
    11031151                                                usage.put(l.getTimestamp(), l.getValue()/100); 
Note: See TracChangeset for help on using the changeset viewer.