|
26 | 26 | public class App { |
27 | 27 |
|
28 | 28 | public static final int WARMUP_COUNT = 5; |
29 | | - private final static int REPEAT_RUN = 5; |
| 29 | + private final static int REPEAT_RUN = 12; |
| 30 | + private final static int DROP_WORST_COUNT = 2; |
30 | 31 | private final static String frameworks[] = {"angular", "angular2","aurelia", "ember/dist", "mithril", "ractive", "react", "vidom", "vue"}; |
31 | 32 | private final static Bench[] benches = new Bench[] {new BenchRun(), new BenchRunHot(), new BenchUpdate(), new BenchSelect(), new BenchRemove()}; |
32 | 33 |
|
@@ -216,6 +217,13 @@ private void runTests() throws Exception { |
216 | 217 | lastWait = data[i]; |
217 | 218 | } |
218 | 219 | } |
| 220 | + System.out.println("before "+Arrays.toString(data)); |
| 221 | + if (DROP_WORST_COUNT>0) { |
| 222 | + Arrays.sort(data); |
| 223 | + data = Arrays.copyOf(data, data.length-DROP_WORST_COUNT); |
| 224 | + System.out.println("after "+Arrays.toString(data)); |
| 225 | + System.out.println(Arrays.toString(data)); |
| 226 | + } |
219 | 227 | DoubleSummaryStatistics stats = DoubleStream.of(data).summaryStatistics(); |
220 | 228 | results.put(framework, bench.getName(), stats); |
221 | 229 | } finally { |
@@ -341,7 +349,7 @@ Double printLog(WebDriver driver, boolean print, boolean isAurelia) throws Excep |
341 | 349 | filter(pe -> pe.ts > tsAfter).findFirst(); |
342 | 350 |
|
343 | 351 | if (print) System.out.println("************************ filtered events"); |
344 | | - filtered.forEach(e -> System.out.println(e)); |
| 352 | + if (print) filtered.forEach(e -> System.out.println(e)); |
345 | 353 | if (evt.isPresent() && lastPaint.isPresent()) { |
346 | 354 | if (print) System.out.println("Duration "+(lastPaint.get().ts + lastPaint.get().duration - evt.get().ts)/1000.0); |
347 | 355 | return (lastPaint.get().ts + lastPaint.get().duration - evt.get().ts)/1000.0; |
|
0 commit comments