Ejemplo n.º 1
0
 private void writeTimeSpentScalabilitySummaryChart() {
   List<XYSeries> seriesList =
       new ArrayList<XYSeries>(plannerBenchmarkResult.getSolverBenchmarkResultList().size());
   for (SolverBenchmarkResult solverBenchmarkResult :
       plannerBenchmarkResult.getSolverBenchmarkResultList()) {
     String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix();
     XYSeries series = new XYSeries(solverLabel);
     for (SingleBenchmarkResult singleBenchmarkResult :
         solverBenchmarkResult.getSingleBenchmarkResultList()) {
       if (singleBenchmarkResult.hasAllSuccess()) {
         long problemScale = singleBenchmarkResult.getProblemBenchmarkResult().getProblemScale();
         long timeMillisSpent = singleBenchmarkResult.getTimeMillisSpent();
         series.add((Long) problemScale, (Long) timeMillisSpent);
       }
     }
     seriesList.add(series);
   }
   XYPlot plot =
       createScalabilityPlot(
           seriesList,
           "Problem scale",
           NumberFormat.getInstance(locale),
           "Time spent",
           new MillisecondsSpentNumberFormat(locale));
   JFreeChart chart =
       new JFreeChart(
           "Time spent scalability summary (lower is better)",
           JFreeChart.DEFAULT_TITLE_FONT,
           plot,
           true);
   timeSpentScalabilitySummaryChartFile =
       writeChartToImageFile(chart, "timeSpentScalabilitySummary");
 }
Ejemplo n.º 2
0
 private void writeAverageCalculateCountPerSecondSummaryChart() {
   List<XYSeries> seriesList =
       new ArrayList<XYSeries>(plannerBenchmarkResult.getSolverBenchmarkResultList().size());
   for (SolverBenchmarkResult solverBenchmarkResult :
       plannerBenchmarkResult.getSolverBenchmarkResultList()) {
     String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix();
     XYSeries series = new XYSeries(solverLabel);
     for (SingleBenchmarkResult singleBenchmarkResult :
         solverBenchmarkResult.getSingleBenchmarkResultList()) {
       if (singleBenchmarkResult.hasAllSuccess()) {
         long problemScale = singleBenchmarkResult.getProblemBenchmarkResult().getProblemScale();
         long averageCalculateCountPerSecond =
             singleBenchmarkResult.getAverageCalculateCountPerSecond();
         series.add((Long) problemScale, (Long) averageCalculateCountPerSecond);
       }
     }
     seriesList.add(series);
   }
   XYPlot plot =
       createScalabilityPlot(
           seriesList,
           "Problem scale",
           NumberFormat.getInstance(locale),
           "Average calculate count per second",
           NumberFormat.getInstance(locale));
   JFreeChart chart =
       new JFreeChart(
           "Average calculate count summary (higher is better)",
           JFreeChart.DEFAULT_TITLE_FONT,
           plot,
           true);
   averageCalculateCountSummaryChartFile =
       writeChartToImageFile(chart, "averageCalculateCountSummary");
 }
Ejemplo n.º 3
0
 private void writeBestScoreScalabilitySummaryChart() {
   // Each scoreLevel has it's own dataset and chartFile
   List<List<XYSeries>> seriesListList = new ArrayList<List<XYSeries>>(CHARTED_SCORE_LEVEL_SIZE);
   int solverBenchmarkIndex = 0;
   for (SolverBenchmarkResult solverBenchmarkResult :
       plannerBenchmarkResult.getSolverBenchmarkResultList()) {
     String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix();
     for (SingleBenchmarkResult singleBenchmarkResult :
         solverBenchmarkResult.getSingleBenchmarkResultList()) {
       if (singleBenchmarkResult.hasAllSuccess()) {
         long problemScale = singleBenchmarkResult.getProblemBenchmarkResult().getProblemScale();
         double[] levelValues =
             ScoreUtils.extractLevelDoubles(singleBenchmarkResult.getAverageScore());
         for (int i = 0; i < levelValues.length && i < CHARTED_SCORE_LEVEL_SIZE; i++) {
           if (i >= seriesListList.size()) {
             seriesListList.add(
                 new ArrayList<XYSeries>(
                     plannerBenchmarkResult.getSolverBenchmarkResultList().size()));
           }
           List<XYSeries> seriesList = seriesListList.get(i);
           while (solverBenchmarkIndex >= seriesList.size()) {
             seriesList.add(new XYSeries(solverLabel));
           }
           seriesList.get(solverBenchmarkIndex).add((double) problemScale, levelValues[i]);
         }
       }
     }
     solverBenchmarkIndex++;
   }
   bestScoreScalabilitySummaryChartFileList = new ArrayList<File>(seriesListList.size());
   int scoreLevelIndex = 0;
   for (List<XYSeries> seriesList : seriesListList) {
     XYPlot plot =
         createScalabilityPlot(
             seriesList,
             "Problem scale",
             NumberFormat.getInstance(locale),
             "Score level " + scoreLevelIndex,
             NumberFormat.getInstance(locale));
     JFreeChart chart =
         new JFreeChart(
             "Best score scalability level " + scoreLevelIndex + " summary (higher is better)",
             JFreeChart.DEFAULT_TITLE_FONT,
             plot,
             true);
     bestScoreScalabilitySummaryChartFileList.add(
         writeChartToImageFile(chart, "bestScoreScalabilitySummaryLevel" + scoreLevelIndex));
     scoreLevelIndex++;
   }
 }
Ejemplo n.º 4
0
 private void writeWorstScoreDifferencePercentageSummaryChart() {
   // Each scoreLevel has it's own dataset and chartFile
   List<DefaultCategoryDataset> datasetList =
       new ArrayList<DefaultCategoryDataset>(CHARTED_SCORE_LEVEL_SIZE);
   for (SolverBenchmarkResult solverBenchmarkResult :
       plannerBenchmarkResult.getSolverBenchmarkResultList()) {
     String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix();
     for (SingleBenchmarkResult singleBenchmarkResult :
         solverBenchmarkResult.getSingleBenchmarkResultList()) {
       String planningProblemLabel = singleBenchmarkResult.getProblemBenchmarkResult().getName();
       if (singleBenchmarkResult.hasAllSuccess()) {
         double[] levelValues =
             singleBenchmarkResult.getWorstScoreDifferencePercentage().getPercentageLevels();
         for (int i = 0; i < levelValues.length && i < CHARTED_SCORE_LEVEL_SIZE; i++) {
           if (i >= datasetList.size()) {
             datasetList.add(new DefaultCategoryDataset());
           }
           datasetList.get(i).addValue(levelValues[i], solverLabel, planningProblemLabel);
         }
       }
     }
   }
   worstScoreDifferencePercentageSummaryChartFileList = new ArrayList<File>(datasetList.size());
   int scoreLevelIndex = 0;
   for (DefaultCategoryDataset dataset : datasetList) {
     CategoryPlot plot =
         createBarChartPlot(
             dataset,
             "Worst score difference percentage level " + scoreLevelIndex,
             NumberFormat.getPercentInstance(locale));
     JFreeChart chart =
         new JFreeChart(
             "Worst score difference percentage level "
                 + scoreLevelIndex
                 + " summary (higher is better)",
             JFreeChart.DEFAULT_TITLE_FONT,
             plot,
             true);
     worstScoreDifferencePercentageSummaryChartFileList.add(
         writeChartToImageFile(
             chart, "worstScoreDifferencePercentageSummaryLevel" + scoreLevelIndex));
     scoreLevelIndex++;
   }
 }
Ejemplo n.º 5
0
 private void writeTimeSpentSummaryChart() {
   DefaultCategoryDataset dataset = new DefaultCategoryDataset();
   for (SolverBenchmarkResult solverBenchmarkResult :
       plannerBenchmarkResult.getSolverBenchmarkResultList()) {
     String solverLabel = solverBenchmarkResult.getNameWithFavoriteSuffix();
     for (SingleBenchmarkResult singleBenchmarkResult :
         solverBenchmarkResult.getSingleBenchmarkResultList()) {
       String planningProblemLabel = singleBenchmarkResult.getProblemBenchmarkResult().getName();
       if (singleBenchmarkResult.hasAllSuccess()) {
         long timeMillisSpent = singleBenchmarkResult.getTimeMillisSpent();
         dataset.addValue(timeMillisSpent, solverLabel, planningProblemLabel);
       }
     }
   }
   CategoryPlot plot =
       createBarChartPlot(dataset, "Time spent", new MillisecondsSpentNumberFormat(locale));
   JFreeChart chart =
       new JFreeChart(
           "Time spent summary (lower time is better)", JFreeChart.DEFAULT_TITLE_FONT, plot, true);
   timeSpentSummaryChartFile = writeChartToImageFile(chart, "timeSpentSummary");
 }