Bug 1374333 - Make pageloader start and capture profiles at better times. r=rwood

Before, we were doing capture after moving from page to page, but keeping the cycles all
within the same profile.

This change causes us to capture separate profiles for each page load, regardless of whether
or not they're just another cycle for a particular page.

This is particularly useful for tests like tps which use the pageloader to load a single test
URL over multiple cycles.

MozReview-Commit-ID: 5u0jxC4P75q

--HG--
extra : rebase_source : 11aa84d7c5d8879afbc932d962bceb1908268f25
This commit is contained in:
Mike Conley 2017-07-10 11:54:41 -04:00
Родитель f9b18e55c0
Коммит e55b23e1d4
1 изменённых файлов: 14 добавлений и 14 удалений

Просмотреть файл

@ -326,6 +326,10 @@ var ContentListener = {
var removeLastAddedListener = null;
var removeLastAddedMsgListener = null;
function plLoadPage() {
if (profilingInfo) {
TalosParentProfiler.beginTest(getCurrentPageShortName() + "_pagecycle_" + pageCycle);
}
var pageName = pages[pageIndex].url.spec;
if (removeLastAddedListener) {
@ -454,23 +458,19 @@ function loadFail() {
var plNextPage = async function() {
var doNextPage = false;
if (profilingInfo) {
await TalosParentProfiler.finishTest();
}
if (pageCycle < numPageCycles) {
pageCycle++;
doNextPage = true;
} else {
if (profilingInfo) {
await TalosParentProfiler.finishTest();
}
if (pageIndex < pages.length - 1) {
pageIndex++;
if (profilingInfo) {
TalosParentProfiler.beginTest(getCurrentPageShortName());
}
recordedName = null;
pageCycle = 1;
doNextPage = true;
}
} else if (pageIndex < pages.length - 1) {
pageIndex++;
recordedName = null;
pageCycle = 1;
doNextPage = true;
}
if (doNextPage == true) {