@@ -0,0 +1,1607 @@
+package tachyon.perf.tools;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport tachyon.perf.basic.PerfTaskContext;%0Aimport tachyon.perf.basic.PerfTotalReport;%0Aimport tachyon.perf.basic.TaskType;%0Aimport tachyon.perf.conf.PerfConf;%0A%0A/**%0A * Generate a total report for the specified test.%0A */%0Apublic class TachyonPerfCollector %7B%0A  public static void main(String%5B%5D args) %7B%0A    if (args.length != 2) %7B%0A      System.err.println(%22Wrong program arguments. Should be %3CTaskType%3E %3Creports dir%3E%22);%0A      System.exit(-1);%0A    %7D%0A%0A    try %7B%0A      PerfTotalReport summaryReport = TaskType.get().getTotalReportClass(args%5B0%5D);%0A      summaryReport.initialSet(args%5B0%5D);%0A      File contextsDir = new File(args%5B1%5D);%0A      File%5B%5D contextFiles = contextsDir.listFiles();%0A      if (contextFiles == null %7C%7C contextFiles.length == 0) %7B%0A        throw new IOException(%22No task context files exists under %22 + args%5B1%5D);%0A      %7D%0A      PerfTaskContext%5B%5D taskContexts = new PerfTaskContext%5BcontextFiles.length%5D;%0A      for (int i = 0; i %3C contextFiles.length; i ++) %7B%0A        taskContexts%5Bi%5D = TaskType.get().getTaskContextClass(args%5B0%5D);%0A        taskContexts%5Bi%5D.loadFromFile(contextFiles%5Bi%5D);%0A      %7D%0A      summaryReport.initialFromTaskContexts(taskContexts);%0A      String outputFileName = PerfConf.get().OUT_FOLDER + %22/TachyonPerfReport-%22 + args%5B0%5D;%0A      summaryReport.writeToFile(new File(outputFileName));%0A      System.out.println(%22Report generated at %22 + outputFileName);%0A    %7D catch (Exception e) %7B%0A      e.printStackTrace();%0A      System.err.println(%22Failed to generate Tachyon-Perf-Report%22);%0A      System.exit(-1);%0A    %7D%0A  %7D%0A%7D%0A

Add tool to generate total report