[PerformanceTests] Add landing html for Dromaeo dom-query test

https://bugs.webkit.org/show_bug.cgi?id=77329

Patch by Hajime Morrita <morrita@chromium.org> on 2012-01-31
Reviewed by Ryosuke Niwa.

PerformanceTests:

Added a "landing html" which includes actual dromaemo page and
send messages to interact with it. The landing html also dumps the
score in run-perf-tests friendly format.

This test isn't enabled until Dromaemo itself is available for run-perf-tests.
It will happen in a separate change.

* Dromaeo/dom-query.html: Added.
* Dromaeo/resources/dromaeorunner.js: Added.
* Skipped: Skipping this for now.

Tools:

Added some more ignorable output patterns to allow warnings
from a third party test suite.

* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner):
(PerfTestsRunner._should_ignore_line_in_parser_test_result):

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106348 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 9504f8bc
2012-01-31 Hajime Morrita <morrita@chromium.org>
[PerformanceTests] Add landing html for Dromaeo dom-query test
https://bugs.webkit.org/show_bug.cgi?id=77329
Reviewed by Ryosuke Niwa.
Added a "landing html" which includes actual dromaemo page and
send messages to interact with it. The landing html also dumps the
score in run-perf-tests friendly format.
This test isn't enabled until Dromaemo itself is available for run-perf-tests.
It will happen in a separate change.
* Dromaeo/dom-query.html: Added.
* Dromaeo/resources/dromaeorunner.js: Added.
* Skipped: Skipping this for now.
2012-01-30 Ryosuke Niwa <rniwa@webkit.org>
Skip inspector tests since they have been timing out.
......
<!DOCTYPE html>
<html>
<head>
<script src="../resources/runner.js"></script>
<script src="resources/dromaeo/web/jquery.js"></script>
<script src="resources/dromaeorunner.js"></script>
<script>
$(document).ready(function() {
DRT.setup("dom-query");
});
</script>
</head>
<body>
<pre id="console"></pre>
</body>
</html>
(function(){
var DRT = {
baseURL: "./resources/dromaeo/web/index.html",
computeScores: function (results) {
var avg = 0, min = 0, max = 0, stdev = 0, varsum = 0;
for (var i = 0; i < results.length; ++i) {
var item = results[i];
avg += item.mean;
min += item.min;
max += item.max;
varsum += item.deviation * item.deviation;
}
return {
median: 0,
avg: avg,
min: min,
max: max,
stdev: Math.sqrt(varsum)
};
},
setup: function(testName) {
var iframe = document.createElement("iframe");
var url = DRT.baseURL + "?" + testName;
iframe.setAttribute("src", url);
document.body.appendChild(iframe);
iframe.addEventListener(
"load", function() {
DRT.targetDocument = iframe.contentDocument;
DRT.targetWindow = iframe.contentDocument.defaultView;
});
window.addEventListener(
"message",
function(event) {
switch(event.data.name) {
case "dromaeo:ready":
DRT.start();
break;
case "dromaeo:progress":
DRT.progress(event.data);
break;
case "dromaeo:alldone":
DRT.teardown(event.data);
break;
}
});
},
start: function() {
DRT.targetWindow.postMessage({ name: "dromaeo:start" } , "*");
},
progress: function(message) {
if (message.status.score)
DRT.log(message.status.score.mean);
},
teardown: function(data) {
var scores = DRT.computeScores(data.result);
printStatistics(scores, DRT.log);
window.setTimeout(function() {
if (window.layoutTestController)
layoutTestController.notifyDone();
}, 0);
},
targetDelegateOf: function(functionName) {
return function() {
DRT.targetWindow[functionName].apply(null, arguments);
};
},
log: function(text) {
document.getElementById("console").innerHTML += (text + "\n");
}
};
// These functions are referred from htmlrunner.js
this.startTest = DRT.targetDelegateOf("startTest");
this.test = DRT.targetDelegateOf("test");
this.endTest = DRT.targetDelegateOf("endTest");
this.prep = DRT.targetDelegateOf("prep");
window.DRT = DRT;
})();
\ No newline at end of file
......@@ -6,6 +6,9 @@ Layout
PageLoad
SunSpider
XSSAuditor
# Blocked by http://webkit.org/b/77328
Dromaeo
# Bug 77024 - Web Inspector: tests in PerformanceTests/inspector/ are timing out
inspector
......@@ -63,13 +63,24 @@ function computeStdev(values) {
return Math.sqrt(sumOfSquaredDeviations / values.length);
}
function printStatistics(stats, printFunction)
{
printFunction("");
printFunction("avg " + stats.avg);
printFunction("median " + stats.median);
printFunction("stdev " + stats.stdev);
printFunction("min " + stats.min);
printFunction("max " + stats.max);
}
function logStatistics(times) {
log("");
log("avg " + computeAverage(times));
log("median " + computeMedian(times));
log("stdev " + computeStdev(times));
log("min " + computeMin(times));
log("max " + computeMax(times));
printStatistics({
avg: computeAverage(times),
median: computeMedian(times),
stdev: computeStdev(times),
min: computeMin(times),
max: computeMax(times)
}, log);
}
function gc() {
......
2012-01-31 Hajime Morrita <morrita@chromium.org>
[PerformanceTests] Add landing html for Dromaeo dom-query test
https://bugs.webkit.org/show_bug.cgi?id=77329
Reviewed by Ryosuke Niwa.
Added some more ignorable output patterns to allow warnings
from a third party test suite.
* Scripts/webkitpy/performance_tests/perftestsrunner.py:
(PerfTestsRunner):
(PerfTestsRunner._should_ignore_line_in_parser_test_result):
2012-01-30 Kevin Ollivier <kevino@theolliviers.com>
[wx] Unreviewed. Update download URLs to new domain.
......@@ -250,13 +250,15 @@ class PerfTestsRunner(object):
re.compile(r'^Running \d+ times$'),
re.compile(r'^Ignoring warm-up '),
re.compile(r'^\d+(.\d+)?$'),
]
# Following are for handle existing test like Dromaeo
re.compile(re.escape("""main frame - has 1 onunload handler(s)""")),
re.compile(re.escape("""frame "<!--framePath //<!--frame0-->-->" - has 1 onunload handler(s)"""))]
def _should_ignore_line_in_parser_test_result(self, line):
if not line:
return True
for regex in self._lines_to_ignore_in_parser_result:
if regex.match(line):
if regex.search(line):
return True
return False
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment