QualityAnalyzer { public QualityInformation computePerformance(Solution bestSol, Topology topology, double workload, SuitableOptions cloudCharacteristics) { if (routes == null) { log.trace("Routing matrix of modules is going to be called"); routes = getRoutingMatrix(topology); log.trace("Routing matrix of modules calculated: {}", Arrays.deepToString(routes)); } double[] workloadsModules = getWorkloadsArray(routes, workload); log.trace("array of workloads for each module calculated"); double[] numVisitsModule = getNumVisitsArray(workloadsModules, workload); log.trace("array of number of visits for each module calculated"); double[] workloadsModulesByCoresAndNumInstances = weightModuleWorkloadByCoresAndNumInstances(workloadsModules, topology, bestSol, cloudCharacteristics); double[] mus = getMusOfSelectedCloudOffers(bestSol, topology, cloudCharacteristics); log.trace("Solution to check the mus is: {}", bestSol.toString()); log.trace("Mus of servers are: {}", Arrays.toString(mus)); log.trace("Num visits modules is: {}", Arrays.toString(numVisitsModule)); log.trace("Workload received of modules: {}", Arrays.toString(workloadsModules)); log.trace("Workload received of each execution unit by its numberOfInstances and Cores: {}", Arrays.toString(workloadsModulesByCoresAndNumInstances)); double respTime = getSystemRespTime(numVisitsModule, workloadsModulesByCoresAndNumInstances, mus); log.trace("calculated response time of the solution {} without considering latencies is: {}", bestSol.toString(), respTime); respTime += addNetworkDelays(bestSol, topology, numVisitsModule, cloudCharacteristics); log.trace("calculated response time of the solution {} is: {}", bestSol.toString(), respTime); properties.setWorkload(workload); properties.setResponseTimeSecs(respTime); return properties; } QualityAnalyzer();  QualityAnalyzer(boolean debug);  QualityAnalyzer(double maxWorkload);  QualityAnalyzer(double maxWorkload, boolean debug);  QualityAnalyzer(double maxWorkload, double workloadIncrement);  QualityAnalyzer(double maxWorkload, double workloadIncrement, boolean debug); QualityInformation getAllComputedQualities(); QualityInformation computePerformance(Solution bestSol, Topology topology, double workload,
         SuitableOptions cloudCharacteristics); double computeAvailability(Solution bestSol, Topology topology, SuitableOptions cloudCharacteristics); double computeCost(Solution bestSol, SuitableOptions cloudCharacteristics); HashMap<String, ArrayList<Double>> computeThresholds(Solution solInput, Topology topology,
         QualityInformation requirements, SuitableOptions cloudCharacteristics);  }
@Test(enabled = TestConstants.EnabledTest) public void testPerformanceEvaluation() { log.info("==== TEST for PERFORMANCE EVALUATION starts ===="); Solution bestSol = createSolution(); Topology topology = createTopology(); SuitableOptions cloudCharacteristics = createSuitableOptions(); QualityInformation qInfo = analyzer.computePerformance(bestSol, topology, WORKLOAD, cloudCharacteristics); Assert.assertTrue("Compute performance returned null", qInfo != null); log.info("Testing performance. Returned application response time is " + qInfo.getResponseTime()); log.info("==== TEST for PERFORMANCE EVALUATION finishes ===="); }