X-Git-Url: https://git.webkit.org/?p=WebKit-https.git;a=blobdiff_plain;f=SunSpider%2Fresources%2Fsunspider-compare-results.js;h=887b8db41a2646adaefdba182dad0fa737de6da7;hp=6dcb2ad9c576c9509d11085d2825b58ba504ec1d;hb=1b1781b04cb6e0db79adb032ac4e9e8de3c47f66;hpb=4cbb6fc32e1a1992b27b2de3019fdcd30ef518ab diff --git a/SunSpider/resources/sunspider-compare-results.js b/SunSpider/resources/sunspider-compare-results.js index 6dcb2ad9c576..887b8db41a26 100644 --- a/SunSpider/resources/sunspider-compare-results.js +++ b/SunSpider/resources/sunspider-compare-results.js @@ -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 < 1.2) ? ratio.toFixed(3).toString() : ((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()