Exemplo n.º 1
0
 private BenchmarkingResult getResultEntry(String key) {
   BenchmarkingResult entry;
   entry = collectedMeasurementData.get(key);
   if (entry == null) {
     entry = (BenchmarkingResult) ProfilerMeasurementData.get(key);
   }
   if (entry == null) {
     entry = new BenchmarkingResult(key);
   }
   return entry;
 }
Exemplo n.º 2
0
  private void writeEntriesToProfilerFiles() throws IOException {
    String dirName = ProfilerMeasurementData.getDataFolder() + "benchmarks/";

    for (Entry<String, BenchmarkingResult> e : collectedMeasurementData.entrySet()) {
      String key = e.getKey();
      String[] parts = key.split("_");
      String fileName = parts[1] + ".properties";
      Writer w = fileWriters.get(dirName + fileName);
      if (w == null) {
        w = new Writer(dirName, fileName);
        fileWriters.put(dirName + fileName, w);
      }
      w.writeln(e.getValue().toString());
    }
  }