Title: [116984] trunk/PerformanceTests
- Revision
- 116984
- Author
- [email protected]
- Date
- 2012-05-14 12:28:47 -0700 (Mon, 14 May 2012)
Log Message
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.
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (116983 => 116984)
--- trunk/PerformanceTests/ChangeLog 2012-05-14 19:24:16 UTC (rev 116983)
+++ trunk/PerformanceTests/ChangeLog 2012-05-14 19:28:47 UTC (rev 116984)
@@ -1,3 +1,17 @@
+2012-05-14 Tony Chang <[email protected]>
+
+ 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 <[email protected]>
Build fix. Don't adjust calls per iteration in the second run.
Modified: trunk/PerformanceTests/resources/runner.js (116983 => 116984)
--- trunk/PerformanceTests/resources/runner.js 2012-05-14 19:24:16 UTC (rev 116983)
+++ trunk/PerformanceTests/resources/runner.js 2012-05-14 19:28:47 UTC (rev 116984)
@@ -24,6 +24,10 @@
};
PerfTestRunner.log = function (text) {
+ if (this._logLines) {
+ this._logLines.push(text);
+ return;
+ }
if (!document.getElementById("log")) {
var pre = document.createElement('pre');
pre.id = 'log';
@@ -118,6 +122,12 @@
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();
@@ -160,6 +170,7 @@
this._completedRuns = -1;
this.customRunFunction = null;
this._results = [];
+ this._logLines = window.layoutTestController ? [] : null;
this.log("Running " + this._runCount + " times");
this._runLoop();
}
_______________________________________________
webkit-changes mailing list
[email protected]
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes