  public static void main(String[] args) throws Exception {
    int reps = 10;
    int sets = 100;
    List<Benchmark> benchmarks = Lists.newArrayList();
    benchmarks.add(new Linpack());
    List<Benchmark.Parameterised> pBenchmarks = Lists.newArrayList();
    pBenchmarks.add(new Ddot());
    pBenchmarks.add(new Dgemm());
    for (Benchmark b : benchmarks) {
      File file = new File(getTarget(b) + ".csv");
      log.info("writing to " + file);
      @Cleanup CSVWriter csv = new CSVWriter(new FileWriter(file));
      for (int i = 0; i < reps; i++) {
        long result = b.benchmark();
        csv.writeNext(new String[]{Long.toString(result)});
      }
    }
    double factor = 6 / 100.0;
    for (Benchmark.Parameterised b : pBenchmarks) {
      File file = new File(getTarget(b) + ".csv");
      log.info("writing to " + file);
      @Cleanup CSVWriter csv = new CSVWriter(new FileWriter(file));
      for (int i = 0; i < reps; i++) {
        for (int j = sets; j > 0; j--) {
          int size = (int) Math.pow(10, factor * j);
          if (size < 10) continue;
          long result = b.benchmark(size);
          csv.writeNext(new String[]{Long.toString(result)});
        }
      }
    }
  }

  public static void main(String[] args) throws Exception {
    int reps = 10;
    int sets = 100;
    List<Benchmark> benchmarks = Lists.newArrayList();
    benchmarks.add(new Linpack());
    List<Benchmark.Parameterised> pBenchmarks = Lists.newArrayList();
    pBenchmarks.add(new Ddot());
    pBenchmarks.add(new Dgemm());
    for (Benchmark b : benchmarks) {
      File file = new File(getTarget(b) + ".csv");
      log.info("writing to " + file);
      @Cleanup CSVWriter csv = new CSVWriter(new FileWriter(file));
      for (int i = 0; i < reps; i++) {
        long result = b.benchmark();
        csv.writeNext(new String[]{Long.toString(result)});
      }
    }
    double factor = 6 / 100.0;
    for (Benchmark.Parameterised b : pBenchmarks) {
      File file = new File(getTarget(b) + ".csv");
      log.info("writing to " + file);
      @Cleanup CSVWriter csv = new CSVWriter(new FileWriter(file));
      for (int i = 0; i < reps; i++) {
        for (int j = sets; j > 0; j--) {
          int size = (int) Math.pow(10, factor * j);
          if (size < 10) continue;
          long result = b.benchmark(size);
          csv.writeNext(new String[]{Integer.toString(size), Long.toString(result)});
        }
      }
    }
  }
