--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/java/src/main/java/cz/cvut/fit/swing/calipel/core/BenchmarkOutcome.java Wed Nov 05 21:15:34 2014 +0100
@@ -0,0 +1,34 @@
+package cz.cvut.fit.swing.calipel.core;
+
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.List;
+import java.util.Map;
+
+public class BenchmarkOutcome {
+
+ private final BenchmarkInstance benchmarkInstance;
+ private final List<Long> durations;
+
+ public BenchmarkOutcome(BenchmarkInstance benchmarkInstance, List<Long> durations) {
+ this.benchmarkInstance = benchmarkInstance;
+ this.durations = durations;
+ }
+
+ @Override
+ public String toString() {
+ return "BenchmarkOutcome{" +
+ "benchmarkInstance=" + benchmarkInstance +
+ ", durations=" + durations +
+ '}';
+ }
+
+ public Map toMap() {
+ Map map = new LinkedHashMap();
+ map.put("benchmark", benchmarkInstance.toMap());
+ map.put("times", durations);
+ map.put("parameters", Collections.emptyMap());
+
+ return map;
+ }
+}