Reviewed by Sam.
authormjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2007 05:33:50 +0000 (05:33 +0000)
committermjs@apple.com <mjs@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Thu, 13 Dec 2007 05:33:50 +0000 (05:33 +0000)
        - Change sunspider-compare-results output from showing "% faster" values to "x as fast" values.

        A sample of what new-style results would look like:

        TEST                   COMPARISON            FROM                 TO             DETAILS
        ...
        ** TOTAL **:           1.41x as fast     6613.6ms +/- 0.1%   4703.0ms +/- 0.1%     significant
        ...
            3bit-bits-in-byte: *1.36x as slow*     88.8ms +/- 0.6%    121.1ms +/- 0.6%     significant

        * resources/sunspider-compare-results.js:

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

SunSpider/ChangeLog
SunSpider/resources/sunspider-compare-results.js

index 91c1c05..f0d6879 100644 (file)
@@ -1,3 +1,19 @@
+2007-12-12  Maciej Stachowiak  <mjs@apple.com>
+
+        Reviewed by Sam.
+        
+        - Change sunspider-compare-results output from showing "% faster" values to "x as fast" values.
+        
+        A sample of what new-style results would look like:
+        
+        TEST                   COMPARISON            FROM                 TO             DETAILS
+        ...
+        ** TOTAL **:           1.41x as fast     6613.6ms +/- 0.1%   4703.0ms +/- 0.1%     significant
+        ...
+            3bit-bits-in-byte: *1.36x as slow*     88.8ms +/- 0.6%    121.1ms +/- 0.6%     significant
+        
+        * resources/sunspider-compare-results.js:
+
 2007-11-14  Eric Seidel  <eric@webkit.org>
 
         Reviewed by Sam.
index 6dcb2ad..b7b9d1f 100644 (file)
@@ -305,7 +305,10 @@ function sunspiderCompareResults(output1, output2)
         var percentage = 100 * diff / mean1;
         var isFaster = diff < 0;
         var probablySame = (percentage < 0.1) && !statisticallySignificant;
-        
+        var ratio = isFaster ? (mean1 / mean2) : (mean2 / mean1);
+        var fixedRatio = (ratio < 10) ? ratio.toFixed(2).toString() : ratio.toFixed(1).toString();
+        var formattedRatio = isFaster ? fixedRatio + "x as fast" : "*" + fixedRatio + "x as slow*";
+
         var diffSummary;
         var diffDetail;
         
@@ -314,14 +317,13 @@ function sunspiderCompareResults(output1, output2)
             diffDetail = "";
         } else if (!statisticallySignificant) {
             diffSummary = "??";
-            diffDetail =  "    not conclusive: might be " + Math.abs(percentage).toFixed(1).toString() + "% ";
-            diffDetail += (isFaster ? "faster" : "*slower*");
+            diffDetail =  "    not conclusive: might be " + formattedRatio;
         } else {
-            diffSummary = Math.abs(percentage).toFixed(1).toString() + "% " + (isFaster ? "faster" : "*slower*");
+            diffSummary = formattedRatio;
             diffDetail = "    significant"; 
         }
         
-        return result + pad(diffSummary, 16) + formatMean(meanWidth1, mean1, stdErr1, count1) + "  " + formatMean(meanWidth2, mean2, stdErr2, count2) + diffDetail;
+        return result + pad(diffSummary, 18) + formatMean(meanWidth1, mean1, stdErr1, count1) + "  " + formatMean(meanWidth2, mean2, stdErr2, count2) + diffDetail;
     }
     
     function printOutput()