Reviewed by Mark.
[WebKit-https.git] / SunSpider / hosted / sunspider-driver.html
index f61d0a9..16fbca9 100644 (file)
@@ -72,17 +72,17 @@ function recordResult(time)
 
 function finish()
 {
-    var outputString = "[";
-    for (var i = 0; i < output.length; i++) {
-        outputString += "{";
-        for (var test in output[i]) {
-            outputString += '"' + test + '":' + output[i][test] + ",";
+    var outputString = "{";
+    for (var test in output[0]) {
+        outputString += '"' + test + '":[';
+        for (var i = 0; i < output.length; i++) {
+             outputString += output[i][test] + ",";
         }
         outputString = outputString.substring(0, outputString.length - 1);
-        outputString += "},";
+        outputString += "],";
     }
     outputString = outputString.substring(0, outputString.length - 1);
-    outputString += "]";
+    outputString += "}";
 
     location = "sunspider-results.html?" + encodeURI(outputString);
 }