Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAxel Richard2014-02-18 10:07:39 -0500
committerAxel Richard2014-02-18 10:07:39 -0500
commit538054e472209ea842eede13f57b7a0578cdb0ae (patch)
tree175de6760da73ca55268243cb2ccdbaa321800c6 /performance
parent5686c4a5234739db97c7404d9d4a71cfa4d4e00a (diff)
downloadorg.eclipse.emf.compare-538054e472209ea842eede13f57b7a0578cdb0ae.tar.gz
org.eclipse.emf.compare-538054e472209ea842eede13f57b7a0578cdb0ae.tar.xz
org.eclipse.emf.compare-538054e472209ea842eede13f57b7a0578cdb0ae.zip
Add headline in csv file if doesn't exists
Diffstat (limited to 'performance')
-rw-r--r--performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/AbstractEMFComparePerformanceTest.java8
1 files changed, 8 insertions, 0 deletions
diff --git a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/AbstractEMFComparePerformanceTest.java b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/AbstractEMFComparePerformanceTest.java
index 5fce2cafe..1c26d8489 100644
--- a/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/AbstractEMFComparePerformanceTest.java
+++ b/performance/org.eclipse.emf.compare.tests.performance/src/org/eclipse/emf/compare/tests/performance/AbstractEMFComparePerformanceTest.java
@@ -14,8 +14,10 @@ import static com.google.common.collect.Iterables.concat;
import static com.google.common.collect.Iterables.getFirst;
import static com.google.common.collect.Iterables.transform;
+import java.io.BufferedReader;
import java.io.BufferedWriter;
import java.io.File;
+import java.io.FileReader;
import java.io.FileWriter;
import java.io.IOException;
import java.io.PrintWriter;
@@ -169,6 +171,11 @@ public abstract class AbstractEMFComparePerformanceTest {
PrintWriter writer = null;
try {
writer = new PrintWriter(new BufferedWriter(new FileWriter(output, true), 16384));
+ BufferedReader br = new BufferedReader(new FileReader(output));
+ if (br.readLine() == null) {
+ br.close();
+ writer.println("Date, Small UML, Nominal UML, Large UML");
+ }
writer.print(timestamp + ",");
Collection<Measure> measures = entry.getValue();
ImmutableListMultimap<Scenario, Measure> measuresByScenario = Multimaps.index(measures, MEASURE__SCENARIO);
@@ -203,6 +210,7 @@ public abstract class AbstractEMFComparePerformanceTest {
})
);
writer.println(joinedMeasure);
+
} catch (IOException e) {
Throwables.propagate(e);
} finally {

Back to the top