equal
deleted
inserted
replaced
|
1 package cz.cvut.fit.swing.calipel.core; |
|
2 |
|
3 import java.util.ArrayList; |
|
4 import java.util.List; |
|
5 |
|
6 public class BenchmarkResult { |
|
7 |
|
8 private List<BenchmarkFailure> failedBenchmarks = new ArrayList<BenchmarkFailure>(); |
|
9 private List<BenchmarkOutcome> measuredBenchmarks = new ArrayList<BenchmarkOutcome>(); |
|
10 |
|
11 |
|
12 public void benchmarkFailed(Benchmark benchmark, Exception e) { |
|
13 failedBenchmarks.add(new BenchmarkFailure(benchmark, e)); |
|
14 } |
|
15 |
|
16 public void benchmarkMeasured(BenchmarkInstance benchmark, List<Long> durations) { |
|
17 measuredBenchmarks.add(new BenchmarkOutcome(benchmark, durations)); |
|
18 } |
|
19 |
|
20 @Override |
|
21 public String toString() { |
|
22 return "BenchmarkResult{" + |
|
23 "failedBenchmarks=" + failedBenchmarks + |
|
24 ", measuredBenchmarks=" + measuredBenchmarks + |
|
25 '}'; |
|
26 } |
|
27 |
|
28 public List<BenchmarkOutcome> getMeasuredBenchmarks() { |
|
29 return measuredBenchmarks; |
|
30 } |
|
31 } |