PerfTestRunner.computeStatistics incorrectly calculates min, max and median
authortomz@codeaurora.org <tomz@codeaurora.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 18:22:22 +0000 (18:22 +0000)
committertomz@codeaurora.org <tomz@codeaurora.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sun, 29 Apr 2012 18:22:22 +0000 (18:22 +0000)
https://bugs.webkit.org/show_bug.cgi?id=85111

Reviewed by Ryosuke Niwa.

The sort of the data input was being done alphabetically.
So I provided a numeric compare function.

* resources/runner.js:

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@115598 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/ChangeLog
PerformanceTests/resources/runner.js

index b90a813..1b73450 100644 (file)
@@ -1,3 +1,15 @@
+2012-04-29  Tom Zakrajsek  <tomz@codeaurora.org>
+
+        PerfTestRunner.computeStatistics incorrectly calculates min, max and median
+        https://bugs.webkit.org/show_bug.cgi?id=85111
+
+        Reviewed by Ryosuke Niwa.
+
+        The sort of the data input was being done alphabetically.
+        So I provided a numeric compare function.
+
+        * resources/runner.js:
+
 2012-04-17  Ilya Tikhonovsky  <loislo@chromium.org>
 
         Web Inspector: the fix for test after massive rename in r114271.
index 1bc2a10..710d93b 100644 (file)
@@ -52,7 +52,7 @@ PerfTestRunner.computeStatistics = function (times) {
     var data = times.slice();
 
     // Add values from the smallest to the largest to avoid the loss of significance
-    data.sort();
+    data.sort(function(a,b){return a-b;});
 
     var middle = Math.floor(data.length / 2);
     var result = {