public static void main(String[] args) {
    File logs = new File("../results");
    BenchmarkCollection bc = new BenchmarkCollection(logs);

    for (BenchmarkGroup group : BenchmarkGroup.values()) {
      System.out.println("processing: " + group);

      Map<Integer, Set<Benchmark>> benchmarks = bc.getBenchmarks(group);
      Map<Integer, DefaultCategoryDataset> datasets = toDatasets(benchmarks);
      for (Entry<Integer, DefaultCategoryDataset> entry : datasets.entrySet()) {
        int benchmarkCount = benchmarks.get(entry.getKey()).size();
        System.out.printf("\t%d: %s benchmarks\n", entry.getKey(), benchmarkCount);
        generateChart(title(group, entry.getKey()), entry.getValue(), benchmarkCount);
      }
    }

    System.out.println();

    for (Entry<Integer, Set<Benchmark>> entry : bc.getBenchmarks().entrySet()) {
      int entityCount = entry.getKey();
      System.out.println("#### Benchmarks: " + entityCount + " entites");
      System.out.println();
      System.out.printf(
          " ![it%1$dk][it%1$dk] ![ir%1$dk][ir%1$dk] ![arc%1$dk][arc%1$dk]\n", (entityCount / 1024));
      System.out.println();
      ResultTable table = new ResultTable(entry.getValue());
      table.printTable(System.out);
      System.out.println();
      System.out.println();
    }
  }
 private static String title(BenchmarkGroup group, int entityCount) {
   switch (group) {
     case ITERATION:
       return "iteration: " + entityCount + " entities";
     case INSERT_REMOVE:
       return "insert/remove: " + entityCount + " entities";
     case THRESHOLD:
       return "baseline: " + entityCount + " entities";
     case TRANSMUTE:
       return "add/remove components: " + entityCount + " entities";
     default:
       throw new RuntimeException(group.name());
   }
 }