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

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

Issue 2717713003: Add a module for tracking categories that metrics depend on. (Closed)
Patch Set: Created 3 years, 10 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
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 49b5077aeb1157a6343d6eec0a4f94137d2a8ead..063ee016cd1c6e4cb6459bfb2bdc26ba56109a2c 100644
--- a/tools/perf/benchmarks/page_cycler_v2.py
+++ b/tools/perf/benchmarks/page_cycler_v2.py
@@ -11,40 +11,19 @@ https://docs.google.com/document/d/1EZQX-x3eEphXupiX-Hq7T4Afju5_sIdxPWYetj7ynd0
from core import perf_benchmark
import page_sets
+from benchmarks import metric_dependencies
from telemetry import benchmark
from telemetry.page import cache_temperature
from telemetry.web_perf import timeline_based_measurement
-def AugmentOptionsForLoadingMetrics(tbm_options):
- cat_filter = tbm_options.config.chrome_trace_config.category_filter
-
- # "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')
-
- # "loading" is needed for first-meaningful-paint computation.
- cat_filter.AddIncludedCategory('loading')
-
- # "toplevel" category is used to capture TaskQueueManager events
- # necessary to compute time-to-interactive.
- cat_filter.AddIncludedCategory('toplevel')
-
- tbm_options.AddTimelineBasedMetric('loadingMetric')
- return tbm_options
-
-
class _PageCyclerV2(perf_benchmark.PerfBenchmark):
options = {'pageset_repeat': 2}
def CreateTimelineBasedMeasurementOptions(self):
tbm_options = timeline_based_measurement.Options()
- AugmentOptionsForLoadingMetrics(tbm_options)
+ tbm_options.SetTimelineBasedMetrics(['loadingMetric'])
+ metric_dependencies.AugmentOptionsForMetrics(tbm_options, ['loadingMetric'])
return tbm_options
@classmethod

Powered by Google App Engine
This is Rietveld 408576698