ARES-6 incorrectly measures Worst 4 Iterations
[WebKit-https.git] / PerformanceTests / ARES-6 / results.js
index 28563cd5850113388eaff738cc0fe74f904e20ec..f148d09a641fe1a8425b526dde9b81df9f761e29 100644 (file)
@@ -59,7 +59,7 @@ class Results {
 
         this.firstIteration.add(times[0]);
         let steadyTimes = times.slice(1).sort((a, b) => b - a); // Sort in reverse order.
-        this.averageWorstCase.add((times[0] + times[1] + times[2] + times[3]) / 4);
+        this.averageWorstCase.add((steadyTimes[0] + steadyTimes[1] + steadyTimes[2] + steadyTimes[3]) / 4);
         this.steadyState.add(steadyTimes.reduce((previous, current) => previous + current) / steadyTimes.length);
         this.reportDone();
     }