Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(850)

Unified Diff: tools/perf/page_sets/blank_page.py

Issue 1307203006: telemetry: Fix startup benchmarks so that all metrics get recorded. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/blank_page.py
diff --git a/tools/perf/page_sets/blank_page.py b/tools/perf/page_sets/blank_page.py
index 6f87074b3f80a86df5893196d7212671e7400a6c..92d46b01f539c1833d3121eb3874097eaa2943b3 100644
--- a/tools/perf/page_sets/blank_page.py
+++ b/tools/perf/page_sets/blank_page.py
@@ -9,6 +9,18 @@ class BlankPage(page_module.Page):
def __init__(self, url, 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.NonEmptyPaint is recorded.
+ action_runner.ExecuteJavaScript(
+ """
+ this.hasRunRAF = 0;
+ requestAnimationFrame(function() {
+ this.hasRunRAF = 1;
+ });
+ """
+ )
+ action_runner.WaitForJavaScriptCondition("this.hasRunRAF == 1")
class BlankPageSet(story.StorySet):
"""A single blank page."""
« no previous file with comments | « tools/perf/measurements/startup.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698