public void analyze(Reader jmeterResult) throws Exception {

    Map<String, AggregatedResponses> testResults = new JMeterResultParser().aggregate(jmeterResult);


    if (testResults.size() == 0) {
      System.err.println("No results available"); // NOSONAR
    }
    else {

      renderTextToStdOut(testResults);
      renderTextAsFile(testResults);
      renderHTML(testResults);
      if(generateCSVs || generateCharts) {
        // Process every AggregatedResponse
        for (Map.Entry<String, AggregatedResponses> entry : testResults.entrySet()) {

          String name = entry.getKey();
          projectName = name;
          AggregatedResponses aggregatedResponses = entry.getValue();
          /**
           * Write the result to database;
           */
          writeDatabase(projectName, username, pwd, host, database, aggregatedResponses);
          
          if (generateCSVs) {

            // write durations by uri
            String durationsFilename = urlEncode(name) + DURATIONS_CSV_SUFFIX;
            writeCSVs(durationsFilename,aggregatedResponses.getDurationByUri());

            // write size by uri
            String sizeFilename = urlEncode(name) + SIZES_CSV_SUFFIX;
            writeCSVs(sizeFilename, aggregatedResponses.getSizeByUri());
          }

          if (generateCharts) {
            writeChart(name, aggregatedResponses);
          }

        }
      }
      

    }


    // --- download resources
    if (remoteResources != null) {
      long[] startEnd = getStartEnd(testResults.values());
      readResources(remoteResources, targetDirectory, startEnd[0], startEnd[1]);
    }
  }