Permalink
Browse files

Added Mozilla Talos support to Dromaeo.

  • Loading branch information...
1 parent 0b96e6b commit 2c6bfa2f8b31a17397ab4deae1422a8bc9633762 @jeresig committed Dec 10, 2009
Showing with 36 additions and 2 deletions.
  1. +13 −0 Makefile
  2. +23 −2 dep/web/webrunner.js
View
@@ -4,10 +4,23 @@ HTMLTESTS = tests/*.html
RESULTS = results
PERF = perf
WEB = web
+TALOS = talos
PERFSINGLE = perf-single
all: spidermonkey rhino tamarin jscore
+talos: web
+ @@ rm -rf ${TALOS}
+ @@ mv ${WEB} ${TALOS}
+ @@ echo "Generating talos tests..."
+ @@ for i in talos/tests/*.html; do \
+ TEST=`echo "$${i}" | sed s/.html// | sed s/talos.tests.//`; \
+ echo "Converting $${TEST} to talos test..."; \
+ sed "s/<head>/<head><!-- MOZ_INSERT_CONTENT_HOOK --><script>var limitSearch='$${TEST}';<\/script>/" talos/index.html > \
+ "talos/$${TEST}.html"; \
+ echo "% $${TEST}.html" >> talos/dromaeo.manifest; \
+ done
+
web: ${TESTS}
@@ rm -rf ${WEB}
@@ cp -fR dep/web ${WEB}
View
@@ -232,7 +232,7 @@
var nameDone = {};
// Query String Parsing
- var search = (window.location.search || "?").substr(1);
+ var search = window.limitSearch || (window.location.search || "?").substr(1);
search = search.replace(/&runStyle=([^&]+)/, function(all, type){
runStyle = type;
@@ -358,8 +358,25 @@
$("#overview input").remove();
updateTimebar();
+
+ if ( window.limitSearch ) {
+ var summary = (runStyle === "runs/s" ? Math.pow(Math.E, maxTotal / maxTotalNum) : maxTotal).toFixed(2);
+
+ if ( typeof tpRecordTime !== "undefined" ) {
+ tpRecordTime( summary );
+
+ } else {
+ var pre = document.createElement("pre");
+ pre.style.display = "none";
+ pre.innerHTML = "__start_report" + summary + "__end_report";
+ document.body.appendChild( pre );
+ }
+
+ if ( typeof goQuitApplication !== "undefined" ) {
+ goQuitApplication();
+ }
- if ( dataStore && dataStore.length ) {
+ } else if ( dataStore && dataStore.length ) {
$("body").addClass("alldone");
var div = jQuery("<div class='results'>Saving...</div>").insertBefore("#overview");
jQuery.ajax({
@@ -403,6 +420,10 @@
this.value = "Pause";
}
});
+
+ if ( window.limitSearch ) {
+ $("#pause").click();
+ }
}
function initTest(curID){

0 comments on commit 2c6bfa2

Please sign in to comment.