Title: [132316] trunk/PerformanceTests
- Revision
- 132316
- Author
- zol...@webkit.org
- Date
- 2012-10-23 23:43:28 -0700 (Tue, 23 Oct 2012)
Log Message
Store the loaded file locally in measurePageLoadTime
https://bugs.webkit.org/show_bug.cgi?id=100172
Reviewed by Csaba Osztrogonác.
Store the loaded file as a local variable instead of attaching it to the test object.
Handle chunkSize inside test.run.
* resources/runner.js:
(.):
Modified Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (132315 => 132316)
--- trunk/PerformanceTests/ChangeLog 2012-10-24 06:35:30 UTC (rev 132315)
+++ trunk/PerformanceTests/ChangeLog 2012-10-24 06:43:28 UTC (rev 132316)
@@ -1,5 +1,18 @@
2012-10-23 Zoltan Horvath <zol...@webkit.org>
+ Store the loaded file locally in measurePageLoadTime
+ https://bugs.webkit.org/show_bug.cgi?id=100172
+
+ Reviewed by Csaba Osztrogonác.
+
+ Store the loaded file as a local variable instead of attaching it to the test object.
+ Handle chunkSize inside test.run.
+
+ * resources/runner.js:
+ (.):
+
+2012-10-23 Zoltan Horvath <zol...@webkit.org>
+
Add measurePageLoadTime function to PerfTestRunner
https://bugs.webkit.org/show_bug.cgi?id=100029
Modified: trunk/PerformanceTests/resources/runner.js (132315 => 132316)
--- trunk/PerformanceTests/resources/runner.js 2012-10-24 06:35:30 UTC (rev 132315)
+++ trunk/PerformanceTests/resources/runner.js 2012-10-24 06:43:28 UTC (rev 132316)
@@ -306,18 +306,22 @@
PerfTestRunner.measurePageLoadTime = function(test) {
test.run = function() {
+ var file = PerfTestRunner.loadFile(test.path);
+ if (!test.chunkSize)
+ this.chunkSize = 50000;
+
var chunks = [];
// The smaller the chunks the more style resolves we do.
// Smaller chunk sizes will show more samples in style resolution.
// Larger chunk sizes will show more samples in line layout.
// Smaller chunk sizes run slower overall, as the per-chunk overhead is high.
- var chunkCount = Math.ceil(this.file.length / this.chunkSize);
+ var chunkCount = Math.ceil(file.length / this.chunkSize);
for (var chunkIndex = 0; chunkIndex < chunkCount; chunkIndex++) {
- var chunk = this.file.substr(chunkIndex * this.chunkSize, this.chunkSize);
+ var chunk = file.substr(chunkIndex * this.chunkSize, this.chunkSize);
chunks.push(chunk);
}
- PerfTestRunner.logInfo("Testing " + this.file.length + " byte document in " + chunkCount + " " + this.chunkSize + " byte chunks.");
+ PerfTestRunner.logInfo("Testing " + file.length + " byte document in " + chunkCount + " " + this.chunkSize + " byte chunks.");
var iframe = document.createElement("iframe");
document.body.appendChild(iframe);
@@ -341,10 +345,6 @@
document.body.removeChild(iframe);
};
- this.file = PerfTestRunner.loadFile(test.path);
- if (!test.chunkSize)
- this.chunkSize = 50000;
-
PerfTestRunner.measureTime(test);
}
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo/webkit-changes