Navigation Menu

Skip to content
This repository has been archived by the owner on Jul 22, 2020. It is now read-only.

Commit

Permalink
Added Mozilla Talos support to Dromaeo.
Browse files Browse the repository at this point in the history
  • Loading branch information
jeresig committed Dec 10, 2009
1 parent 0b96e6b commit 2c6bfa2
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
13 changes: 13 additions & 0 deletions Makefile
Expand Up @@ -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}
Expand Down
25 changes: 23 additions & 2 deletions dep/web/webrunner.js
Expand Up @@ -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;
Expand Down Expand Up @@ -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({
Expand Down Expand Up @@ -403,6 +420,10 @@
this.value = "Pause";
}
});

if ( window.limitSearch ) {
$("#pause").click();
}
}

function initTest(curID){
Expand Down

0 comments on commit 2c6bfa2

Please sign in to comment.