https://bugs.webkit.org/show_bug.cgi?id=86028
Reviewed by Ryosuke Niwa.
In some tests, the extra DOM nodes can cause the test timing to change.
Avoid adding DOM nodes until the test is over. When running in a browser,
we append nodes as we run so the user can have some feedback.
* resources/runner.js:
(PerfTestRunner.log): Store the log lines in an array until the test is finished.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@116984
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-05-14 Tony Chang <tony@chromium.org>
+
+ Don't append log lines while perf tests are running.
+ https://bugs.webkit.org/show_bug.cgi?id=86028
+
+ Reviewed by Ryosuke Niwa.
+
+ In some tests, the extra DOM nodes can cause the test timing to change.
+ Avoid adding DOM nodes until the test is over. When running in a browser,
+ we append nodes as we run so the user can have some feedback.
+
+ * resources/runner.js:
+ (PerfTestRunner.log): Store the log lines in an array until the test is finished.
+
2012-05-14 Ryosuke Niwa <rniwa@webkit.org>
Build fix. Don't adjust calls per iteration in the second run.
2012-05-14 Ryosuke Niwa <rniwa@webkit.org>
Build fix. Don't adjust calls per iteration in the second run.
};
PerfTestRunner.log = function (text) {
};
PerfTestRunner.log = function (text) {
+ if (this._logLines) {
+ this._logLines.push(text);
+ return;
+ }
if (!document.getElementById("log")) {
var pre = document.createElement('pre');
pre.id = 'log';
if (!document.getElementById("log")) {
var pre = document.createElement('pre');
pre.id = 'log';
window.setTimeout(function () { PerfTestRunner._runner(); }, 0);
} else {
this.logStatistics(this._results);
window.setTimeout(function () { PerfTestRunner._runner(); }, 0);
} else {
this.logStatistics(this._results);
+ if (this._logLines) {
+ var logLines = this._logLines;
+ this._logLines = null;
+ var self = this;
+ logLines.forEach(function(text) { self.log(text); });
+ }
this._doneFunction();
if (window.layoutTestController)
layoutTestController.notifyDone();
this._doneFunction();
if (window.layoutTestController)
layoutTestController.notifyDone();
this._completedRuns = -1;
this.customRunFunction = null;
this._results = [];
this._completedRuns = -1;
this.customRunFunction = null;
this._results = [];
+ this._logLines = window.layoutTestController ? [] : null;
this.log("Running " + this._runCount + " times");
this._runLoop();
}
this.log("Running " + this._runCount + " times");
this._runLoop();
}