run-benchmark should support Dromaeo
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2015 23:21:43 +0000 (23:21 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 11 May 2015 23:21:43 +0000 (23:21 +0000)
https://bugs.webkit.org/show_bug.cgi?id=144849

Reviewed by Chris Dumez.

Added the benchmark plans for Dromaeo DOM tests. We only run these tests once since
they can take as much as 15 minutes to run each.

* Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan: Added.
* Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan: Added.

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

Tools/ChangeLog
Tools/Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch [new file with mode: 0644]
Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan [new file with mode: 0644]
Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan [new file with mode: 0644]
Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan [new file with mode: 0644]

index cc5fba052b5128c6fecb0c5a36d5258ea3365fb7..d9fd20dc6b3c5876181434591e38d86deb2ae4eb 100644 (file)
@@ -1,3 +1,18 @@
+2015-05-11  Ryosuke Niwa  <rniwa@webkit.org>
+
+        run-benchmark should support Dromaeo
+        https://bugs.webkit.org/show_bug.cgi?id=144849
+
+        Reviewed by Chris Dumez.
+
+        Added the benchmark plans for Dromaeo DOM tests. We only run these tests once since
+        they can take as much as 15 minutes to run each.
+
+        * Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch: Added.
+        * Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan: Added.
+        * Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan: Added.
+        * Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan: Added.
+
 2015-05-11  Ryosuke Niwa  <rniwa@webkit.org>
 
         Build fix. jetstream has a local copy, not remote archive.
diff --git a/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch b/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Dromaeo.patch
new file mode 100644 (file)
index 0000000..6f0de85
--- /dev/null
@@ -0,0 +1,92 @@
+diff --git a/web/webrunner.js b/web/webrunner.js
+index 63d777b..953c026 100755
+--- a/web/webrunner.js
++++ b/web/webrunner.js
+@@ -156,6 +156,7 @@
+                       // Make Sum
+                       results.sum = 0;
++                      results.times = times;
+                       for ( var i = 0; i < num; i++ )
+                               results.sum += times[i];
+@@ -271,6 +272,7 @@
+                       numTests = Number(m[1]);
+       }
++      var currentSuiteName = null;
+       jQuery(function(){
+               var id = search.match(/id=([\d,]+)/);
+@@ -282,6 +284,7 @@
+               var cat = filter.toString().slice(1,-2);
+               if ( catnames[cat] ) {
++                      currentSuiteName = catnames[cat];
+                       $("#overview span:first").html( catnames[cat] );
+                       if ( catnames[cat].length > 22 ) {
+@@ -359,6 +362,25 @@
+                       $("#overview input").remove();
+                       updateTimebar();
++                      var mean = (runStyle === "runs/s" ? Math.pow(Math.E, maxTotal / maxTotalNum) : maxTotal);
++                      var resultsDict = {"Dromaeo": {"tests": {}}};
++                      resultsDict["Dromaeo"]["tests"][currentSuiteName] = {"metrics": {"Runs": {"current": [mean]}}, "tests": subTests};
++                      var results = JSON.stringify(resultsDict);
++                      var xhr = new XMLHttpRequest();
++                      xhr.open("POST", "/report");
++                      xhr.setRequestHeader("Content-Type", "application/json");
++                      xhr.setRequestHeader("Content-Length", results.length);
++                      xhr.setRequestHeader("Connection", "close");
++                      xhr.onreadystatechange = function() {
++                      if(xhr.readyState == XMLHttpRequest.DONE && xhr.status == 200) {
++                                      closeRequest = new XMLHttpRequest();
++                                      closeRequest.open("GET", "/shutdown");
++                                      closeRequest.send();
++                              }
++                      }
++                      xhr.send(results);
++                      return;
++
+                       if ( window.limitSearch ) {
+                               var summary = (runStyle === "runs/s" ? Math.pow(Math.E, maxTotal / maxTotalNum) : maxTotal).toFixed(2);
+@@ -421,7 +443,5 @@
+                               }
+                       });
+-              if ( window.limitSearch ) {
+-                      $("#pause").click();
+-              }
++              $("#pause").click();
+       }
+@@ -673,8 +695,18 @@
+               $("#timebar").width((w < 1 ? 1 : w) + "%");
+       }
+-      
++
++      var subTests = {};
+       function logTest(data){
++              var subTestName = tests[data.curID].name; // e.g. DOM Attributes
++              if (!subTests[subTestName]) {
++                      subTests[subTestName] = {
++                              "metrics": {"Runs": {}},
++                              "tests": {}
++                      }
++              }
++              subTests[subTestName]["tests"][data.name] = {"metrics": {"Runs": {"current": [data.times]}}};
++
+               // Keep a running summary going
+               data.mean = parseFloat(data.mean);
+               var mean = (runStyle === "runs/s" ? Math.log(data.mean) : data.mean);
+@@ -711,6 +743,8 @@
+                       per + "%;'>" + (per >= 100 ? "<span>" + mean.toFixed(2) + runStyle + "</span>" : "") + "</div></div>");
+               if ( per >= 100 && testSummary[data.curID] > 0 ) {
++                      var subTestName = tests[data.curID].name; // e.g. DOM Attributes
++                      subTests[subTestName]["metrics"]["Runs"]["current"] = [mean];
+                       testElems[data.curID].parent().addClass("done");
+               }
+       }
diff --git a/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan b/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-cssquery.plan
new file mode 100644 (file)
index 0000000..3d0c9ad
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "http_server_driver": "SimpleHTTPServerDriver",
+    "timeout": 1200,
+    "count": 1,
+    "benchmark_builder": "GenericBenchmarkBuilder",
+    "remote_archive": "https://github.com/jeresig/dromaeo/archive/ed7e6a8f25ea72f45c191f34a68722f80dc3c513.zip",
+    "benchmark_patch": "data/patches/Dromaeo.patch",
+    "create_script": ["make", "web"],
+    "entry_point": "web/index.html?cssquery",
+    "output_file": "dromaeo.result"
+}
diff --git a/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan b/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-dom.plan
new file mode 100644 (file)
index 0000000..458b3ca
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "http_server_driver": "SimpleHTTPServerDriver",
+    "timeout": 1200,
+    "count": 1,
+    "benchmark_builder": "GenericBenchmarkBuilder",
+    "remote_archive": "https://github.com/jeresig/dromaeo/archive/ed7e6a8f25ea72f45c191f34a68722f80dc3c513.zip",
+    "benchmark_patch": "data/patches/Dromaeo.patch",
+    "create_script": ["make", "web"],
+    "entry_point": "web/index.html?dom",
+    "output_file": "dromaeo.result"
+}
diff --git a/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan b/Tools/Scripts/webkitpy/benchmark_runner/data/plans/dromaeo-jslib.plan
new file mode 100644 (file)
index 0000000..ee5b436
--- /dev/null
@@ -0,0 +1,11 @@
+{
+    "http_server_driver": "SimpleHTTPServerDriver",
+    "timeout": 1200,
+    "count": 1,
+    "benchmark_builder": "GenericBenchmarkBuilder",
+    "remote_archive": "https://github.com/jeresig/dromaeo/archive/ed7e6a8f25ea72f45c191f34a68722f80dc3c513.zip",
+    "benchmark_patch": "data/patches/Dromaeo.patch",
+    "create_script": ["make", "web"],
+    "entry_point": "web/index.html?jslib",
+    "output_file": "dromaeo.result"
+}