Commit ef28db1a authored by rniwa@webkit.org's avatar rniwa@webkit.org

PerfTestRunner should automatically create pre#log

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

Reviewed by Tony Chang.

Automatically generate <pre id="log"></pre> if there isn't one.

* Bindings/event-target-wrapper.html:
* DOM/Accessors.html:
* DOM/CloneNodes.html:
* DOM/CreateNodes.html:
* DOM/DOMDivWalk.html:
* DOM/DOMTable.html:
* DOM/DOMWalk.html:
* DOM/Events.html:
* DOM/GetElement.html:
* DOM/GridSort.html:
* DOM/Template.html:
* Dromaeo/dom-query.html:
* Dromaeo/resources/dromaeorunner.js:
* Parser/html-parser.html:
* Parser/html5-full-render.html:
* Parser/simple-url.html:
* Parser/tiny-innerHTML.html:
* Parser/url-parser.html:
* Parser/xml-parser.html:
* resources/runner.js:
(PerfTestRunner.log):
(PerfTestRunner.printStatistics):


git-svn-id: http://svn.webkit.org/repository/webkit/trunk@106386 268f45cc-cd09-0410-ab3c-d52691b4dbfc
parent 861216b2
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<a href="#">Click here to start</a>
<script>
......
2012-01-31 Ryosuke Niwa <rniwa@webkit.org>
PerfTestRunner should automatically create pre#log
https://bugs.webkit.org/show_bug.cgi?id=77469
Reviewed by Tony Chang.
Automatically generate <pre id="log"></pre> if there isn't one.
* Bindings/event-target-wrapper.html:
* DOM/Accessors.html:
* DOM/CloneNodes.html:
* DOM/CreateNodes.html:
* DOM/DOMDivWalk.html:
* DOM/DOMTable.html:
* DOM/DOMWalk.html:
* DOM/Events.html:
* DOM/GetElement.html:
* DOM/GridSort.html:
* DOM/Template.html:
* Dromaeo/dom-query.html:
* Dromaeo/resources/dromaeorunner.js:
* Parser/html-parser.html:
* Parser/html5-full-render.html:
* Parser/simple-url.html:
* Parser/tiny-innerHTML.html:
* Parser/url-parser.html:
* Parser/xml-parser.html:
* resources/runner.js:
(PerfTestRunner.log):
(PerfTestRunner.printStatistics):
2012-01-31 Ryosuke Niwa <rniwa@webkit.org>
runner.js in performance tests should define a class
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/accessors.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/clonenodes.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/createnodes.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/domdivwalk.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/domtable.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/domwalk.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/events.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/getelement.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/gridsort.js"></script>
......
......@@ -2,7 +2,6 @@
<html>
<body>
<div id="container"><span id="benchmark_content"></span></div>
<pre id="log"></pre>
<script type="text/javascript" src="../resources/runner.js"></script>
<script type="text/javascript" src="resources/dom-perf.js"></script>
<script type="text/javascript" src="resources/dom-perf/template.js"></script>
......
......@@ -11,6 +11,5 @@ $(document).ready(function() {
</script>
</head>
<body>
<pre id="console"></pre>
</body>
</html>
......@@ -61,7 +61,7 @@
teardown: function(data) {
var scores = DRT.computeScores(data.result);
PerfTestRunner.printStatistics(scores, DRT.log);
PerfTestRunner.printStatistics(scores);
window.setTimeout(function() {
if (window.layoutTestController)
layoutTestController.notifyDone();
......@@ -75,7 +75,7 @@
},
log: function(text) {
document.getElementById("console").innerHTML += (text + "\n");
PerfTestRunner.log(text);
}
};
......
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
var spec = PerfTestRunner.loadFile("resources/html5.html");
......@@ -15,5 +14,6 @@ PerfTestRunner.run(function() {
iframe.contentDocument.close();
document.body.removeChild(iframe);
}, 1);
</script>
</body>
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
var spec = loadFile("resources/html5.html");
......
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
var anchor = document.createElement("a");
......
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
PerfTestRunner.run(function() {
......
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
var urls = PerfTestRunner.loadFile("resources/final-url-en").split("\n");
......
<!DOCTYPE html>
<body>
<pre id="log"></pre>
<script src="../resources/runner.js"></script>
<script>
var domParser = new DOMParser();
......
......@@ -2,6 +2,11 @@
var PerfTestRunner = {};
PerfTestRunner.log = function (text) {
if (!document.getElementById("log")) {
var pre = document.createElement('pre');
pre.id = 'log';
document.body.appendChild(pre);
}
document.getElementById("log").innerHTML += text + "\n";
window.scrollTo(0, document.body.height);
}
......@@ -52,16 +57,16 @@ PerfTestRunner.computeStatistics = function (times) {
PerfTestRunner.logStatistics = function (times) {
this.log("");
var statistics = this.computeStatistics(times);
this.printStatistics(statistics, this.log);
this.printStatistics(statistics);
}
PerfTestRunner.printStatistics = function (statistics, printFunction) {
printFunction("");
printFunction("avg " + statistics.mean);
printFunction("median " + statistics.median);
printFunction("stdev " + statistics.stdev);
printFunction("min " + statistics.min);
printFunction("max " + statistics.max);
PerfTestRunner.printStatistics = function (statistics) {
this.log("");
this.log("avg " + statistics.mean);
this.log("median " + statistics.median);
this.log("stdev " + statistics.stdev);
this.log("min " + statistics.min);
this.log("max " + statistics.max);
}
PerfTestRunner.gc = function () {
......
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