Confirmed users, Bureaucrats and Sysops emeriti
792
edits
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
The pageloader component is the core of many of the performance tests that we run via Talos and otherwise, including Tp3, Tsvg, Tgfx, and others. | The pageloader component is the core of many of the performance tests that we run via Talos and otherwise, including Tp3, Tsvg, Tgfx, and others. | ||
The core of the test captures the amount of time between when a page load is requested (that is, when loadURI is called on the content element) and when the 'load' event is fired on the content. Additionally, the harness can also time page render times separately. | |||
== Installation == | == Installation == | ||
| Line 41: | Line 43: | ||
<h4>-tpformat <i>f1,f2,...</i></h4> | <h4>-tpformat <i>f1,f2,...</i></h4> | ||
Display results in the given formats. Supported formats are <i>text</i>,<i>tinderbox</i>,<i>js | Default: js. Display results in the given formats. Supported formats are <i>text</i>,<i>tinderbox</i>,<i>js</i>. See below for samples of each format. | ||
<h4>-tpchrome</h4> | <h4>-tpchrome</h4> | ||
| Line 70: | Line 72: | ||
Don't force cycle collection between each pageload. If this isn't done, pageload times can be skewed due to cycle collection kicking in while a page is loading. In normal browsing usage, CC is done during times when the user is idle. | Don't force cycle collection between each pageload. If this isn't done, pageload times can be skewed due to cycle collection kicking in while a page is loading. In normal browsing usage, CC is done during times when the user is idle. | ||
== The Manifest File == | |||
The manifest file is a simple text file with instructions on which URLs to load. Whitespace and other special characters in URLs must be %-escaped. Comments begin with #, and blank lines are ignored. | |||
URLs are listed one per line, in the order that they should be loaded. | |||
Tests may do their own timing, instead of relying on the automatic timing by the test harness. If a URL line starts with a "%", the test does its own timing. Such a test should call "tpRecordTime" in their JS and pass the number of milliseconds the test took. | |||
Additionally, an include directive may be called to include another manifest. | |||
Example manifest: | |||
<pre> | |||
# This is a comment | |||
# Load news.google.com | |||
http://news.google.com/ | |||
# Load sometest.html in the same location as the manifest | |||
sometest.html | |||
# Load gfxtest.html in the same location as the manifest, | |||
# and indicate that it will do its own timing | |||
% gfxtest.html | |||
# Then include morepages.manifest | |||
include morepages.manifest | |||
</pre> | |||
Note that to obtain stable numbers, it is generally best to set up a local http server with cached versions of all content that is to be loaded. However, measuring live http sites over the internet can be useful, as is using local files using file:///. | |||
== Output Formats == | |||
Four different output formats are supported by the pageloader harness, and one or more can be given as arguments to the -tpformat flag. Output is printed using the javascript dump() command; as such, the profile in use must have the "browser.dom.window.dump.enabled" pref set to true to see any output. | |||
=== text === | |||
Human-readable format. Example: | |||
<pre> | |||
============================================================ | |||
Page mean stdd min max raw | |||
0 yahoo.com/www.yahoo.com/index.html 89 2 85 315 315,90,85,88,91 | |||
1 msn.com/www.msn.com/index.html 342 5 336 938 938,336,347,338,346 | |||
2 google.com/www.google.com/index.html 55 5 49 113 113,56,52,49,61 | |||
3 baidu.com/www.baidu.com/index.html 46 3 43 951 951,43,44,44,51 | |||
Cycle collection: 1070 | |||
============================================================ | |||
</pre> | |||
=== js === | |||
Mostly-JSON-like format; useful for automated tools. Example: | |||
<pre> | |||
([ | |||
({page:"yahoo.com/www.yahoo.com/index.html", value:88.5, stddev:2.29128784747792}), | |||
({page:"msn.com/www.msn.com/index.html", value:341.75, stddev:4.815340071064556}), | |||
({page:"google.com/www.google.com/index.html", value:54.5, stddev:4.5}), | |||
({page:"baidu.com/www.baidu.com/index.html", value:45.5, stddev:3.2015621187164243}), | |||
]) | |||
</pre> | |||
=== tinderbox === | |||
Legacy tinderbox reporting format. Example: | |||
<pre> | |||
__start_tp_report | |||
_x_x_mozilla_page_load,63.5,NaN,NaN | |||
_x_x_mozilla_page_load_details,avgmedian|63.5|average|62.83|minimum|NaN|maximum|NaN|stddev|NaN | |||
|0;yahoo.com/www.yahoo.com/index.html;89;88.5;85;315;315;90;85;88;91 | |||
|1;msn.com/www.msn.com/index.html;346.5;341.75;336;938;938;336;347;338;346 | |||
|2;google.com/www.google.com/index.html;54;54.5;49;113;113;56;52;49;61 | |||
|3;baidu.com/www.baidu.com/index.html;47.5;45.5;43;951;951;43;44;44;51 | |||
__end_tp_report | |||
__start_cc_report | |||
_x_x_mozilla_cycle_collect,1070 | |||
__end_cc_report | |||
</pre> | |||
== Bugs and Patches == | |||
Any bugs or patches should be submitted to the Testing:General component. | |||