Commit df3cbbfc authored by erikchen's avatar erikchen Committed by Commit bot

Reland of lemetry: Fix startup benchmarks so that all metrics get recorded....

Reland of lemetry: Fix startup benchmarks so that all metrics get recorded. (patchset #2 id:70001 of https://codereview.chromium.org/1438533003/ )

Reason for revert:
Looks like my changes were still required to get the metric:

foreground_tab_request_start

https://code.google.com/p/chromium/issues/detail?id=560760&q=owner%3Aerikchen%40chromium.org&sort=-modified&colspec=ID%20Pri%20M%20Iteration%20ReleaseBlock%20Cr%20Status%20Owner%20Summary%20OS%20Modified

Original issue's description:
> Revert of telemetry: Fix startup benchmarks so that all metrics get recorded.
>
> Reason for revert:
> Theoretically, these changes should no longer be required, now that
> https://code.google.com/p/chromium/issues/detail?id=529340#c7 has landed.
>
> Original issue's description:
> > telemetry: Fix startup benchmarks so that all metrics get recorded.
> >
> > *PERF SHERRIF: if startup benchmarks become red, this CL is to be reverted.
> >
> > The lack of a page navigation was preventing the metric
> > Startup.FirstWebContents.NonEmptyPaint from being emitted. The addition of the
> > RAF logic check is to prevent theoretical race conditions - it may be overkill.
> >
> > BUG=513364
> > CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect
> >
> > Committed: https://crrev.com/0bc400e1c96da5a05379bc1b634ec278f36d3417
> > Cr-Commit-Position: refs/heads/master@{#347402}
>
> TBR=nednguyen@google.com
> BUG=513364
> CQ_EXTRA_TRYBOTS=tryserver.chromium.perf:linux_perf_bisect;tryserver.chromium.perf:mac_10_10_perf_bisect;tryserver.chromium.perf:win_perf_bisect;tryserver.chromium.perf:android_nexus5_perf_bisect
>
> Committed: https://crrev.com/359e8b1514eba38cb34d72443c223f49d1a55656
> Cr-Commit-Position: refs/heads/master@{#359024}

TBR=nednguyen@google.com
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=513364

Review URL: https://codereview.chromium.org/1475773003

Cr-Commit-Position: refs/heads/master@{#361404}
parent 2167f8b2
...@@ -29,10 +29,6 @@ class Startup(page_test.PageTest): ...@@ -29,10 +29,6 @@ class Startup(page_test.PageTest):
]) ])
keychain_metric.KeychainMetric.CustomizeBrowserOptions(options) keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
def RunNavigateSteps(self, page, tab):
# Overriden so that no page navigation occurs - startup to the NTP.
pass
def ValidateAndMeasurePage(self, page, tab, results): def ValidateAndMeasurePage(self, page, tab, results):
keychain_metric.KeychainMetric().AddResults(tab, results) keychain_metric.KeychainMetric().AddResults(tab, results)
startup_metric.StartupMetric().AddResults(tab, results) startup_metric.StartupMetric().AddResults(tab, results)
......
...@@ -9,6 +9,18 @@ class BlankPage(page_module.Page): ...@@ -9,6 +9,18 @@ class BlankPage(page_module.Page):
def __init__(self, url, page_set): def __init__(self, url, page_set):
super(BlankPage, self).__init__(url, page_set=page_set) super(BlankPage, self).__init__(url, page_set=page_set)
def RunPageInteractions(self, action_runner):
# Request a RAF and wait for it to be processed to ensure that the metric
# Startup.FirstWebContents.NonEmptyPaint2 is recorded.
action_runner.ExecuteJavaScript(
"""
this.hasRunRAF = 0;
requestAnimationFrame(function() {
this.hasRunRAF = 1;
});
"""
)
action_runner.WaitForJavaScriptCondition("this.hasRunRAF == 1")
class BlankPageSet(story.StorySet): class BlankPageSet(story.StorySet):
"""A single blank page.""" """A single blank page."""
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment