Update speedometer patch to provide better UI, fix merge result bug and add "Score...
[WebKit-https.git] / PerformanceTests / Speedometer / resources / main.js
index 887febbf98676dc164d15968e475ff21cc463c67..535f5fb8568109095c59c86f020f6fcf4daab4da 100644 (file)
@@ -52,7 +52,7 @@ window.benchmarkClient = {
         function totalTimeInDisplayUnit(time) {
             if (displayUnit == 'ms')
                 return time;
-            return 60 * 1000 * suitesCount / time;
+            return computerScore(time);
         }
 
         function sigFigFromPercentDelta(percentDelta) {
@@ -158,6 +158,10 @@ function startBenchmark() {
     runner.runMultipleIterations(benchmarkClient.iterationCount);
 }
 
+function computeScore(time) {
+    return 60 * 1000 * benchmarkClient.suitesCount / time;
+}
+
 function showSection(sectionIdentifier, pushState) {
     var currentSectionElement = document.querySelector('section.selected');
     console.assert(currentSectionElement);