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

Unified Diff: tools/perf/benchmarks/page_cycler_v2.py

Issue 2409073003: Add loading mobile benchmark (but disable it) (Closed)
Patch Set: Created 4 years, 2 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/benchmarks/loading.py ('k') | tools/perf/page_sets/data/loading_mobile.json » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/page_cycler_v2.py
diff --git a/tools/perf/benchmarks/page_cycler_v2.py b/tools/perf/benchmarks/page_cycler_v2.py
index 0459c67540ef4b94a2330dac101194df9ecb87ac..49bbb48d4f3ce448fdd6085ec82ecaccb01f3f03 100644
--- a/tools/perf/benchmarks/page_cycler_v2.py
+++ b/tools/perf/benchmarks/page_cycler_v2.py
@@ -17,32 +17,36 @@ from telemetry.timeline import chrome_trace_category_filter
from telemetry.web_perf import timeline_based_measurement
-class _PageCyclerV2(perf_benchmark.PerfBenchmark):
- options = {'pageset_repeat': 2}
+def TimelineBasedMeasurementOptionsForLoadingMetric():
+ cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
- def CreateTimelineBasedMeasurementOptions(self):
- cat_filter = chrome_trace_category_filter.ChromeTraceCategoryFilter()
+ # "blink.console" is used for marking ranges in
+ # cache_temperature.MarkTelemetryInternal.
+ cat_filter.AddIncludedCategory('blink.console')
+
+ # "navigation" and "blink.user_timing" are needed to capture core
+ # navigation events.
+ cat_filter.AddIncludedCategory('navigation')
+ cat_filter.AddIncludedCategory('blink.user_timing')
- # "blink.console" is used for marking ranges in
- # cache_temperature.MarkTelemetryInternal.
- cat_filter.AddIncludedCategory('blink.console')
+ # "loading" is needed for first-meaningful-paint computation.
+ cat_filter.AddIncludedCategory('loading')
- # "navigation" and "blink.user_timing" are needed to capture core
- # navigation events.
- cat_filter.AddIncludedCategory('navigation')
- cat_filter.AddIncludedCategory('blink.user_timing')
+ # "toplevel" category is used to capture TaskQueueManager events
+ # necessary to compute time-to-interactive.
+ cat_filter.AddIncludedCategory('toplevel')
- # "loading" is needed for first-meaningful-paint computation.
- cat_filter.AddIncludedCategory('loading')
+ tbm_options = timeline_based_measurement.Options(
+ overhead_level=cat_filter)
+ tbm_options.SetTimelineBasedMetrics(['loadingMetric'])
+ return tbm_options
- # "toplevel" category is used to capture TaskQueueManager events
- # necessary to compute time-to-interactive.
- cat_filter.AddIncludedCategory('toplevel')
- tbm_options = timeline_based_measurement.Options(
- overhead_level=cat_filter)
- tbm_options.SetTimelineBasedMetrics(['loadingMetric'])
- return tbm_options
+class _PageCyclerV2(perf_benchmark.PerfBenchmark):
+ options = {'pageset_repeat': 2}
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ return TimelineBasedMeasurementOptionsForLoadingMetric()
@classmethod
def ShouldDisable(cls, possible_browser):
« no previous file with comments | « tools/perf/benchmarks/loading.py ('k') | tools/perf/page_sets/data/loading_mobile.json » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698