JetStream 2 should not report time values as scores
[WebKit-https.git] / PerformanceTests / JetStream2 / JetStreamDriver.js
index c777f88..c228f0c 100644 (file)
@@ -82,6 +82,10 @@ function toScore(timeValue) {
     return 5000 / timeValue;
 }
 
+function toTimeValue(score) {
+    return 5000 / score;
+}
+
 function updateUI() {
     return new Promise((resolve) => {
         if (isInBrowser)
@@ -319,7 +323,7 @@ class Driver {
             const subResults = {}
             const subTimes = benchmark.subTimes();
             for (const name in subTimes) {
-                subResults[name] = {"metrics": {"Time": {"current": [subTimes[name]]}}};
+                subResults[name] = {"metrics": {"Time": {"current": [toTimeValue(subTimes[name])]}}};
             }
             results[benchmark.name] = {
                 "metrics" : {