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

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

Issue 2835903004: [Telemetry] Refactor a Loading benchmark base class. (Closed)
Patch Set: Created 3 years, 8 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/loading.py
diff --git a/tools/perf/benchmarks/loading.py b/tools/perf/benchmarks/loading.py
index 7dd52eab647d2d94fe3fdf46111abdc4b02d6d26..7aacd00996a987a311aac9202d0bcc35c18fb139 100644
--- a/tools/perf/benchmarks/loading.py
+++ b/tools/perf/benchmarks/loading.py
@@ -13,10 +13,8 @@ from telemetry.page import traffic_setting
from telemetry.web_perf import timeline_based_measurement
-@benchmark.Enabled('android')
-@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org'])
-class LoadingMobile(perf_benchmark.PerfBenchmark):
- """ A benchmark measuring loading performance of mobile sites. """
+class _LoadingBase(perf_benchmark.PerfBenchmark):
+ """ A base class for loading benchmarks. """
options = {'pageset_repeat': 2}
@@ -25,6 +23,12 @@ class LoadingMobile(perf_benchmark.PerfBenchmark):
page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options)
return tbm_options
+
+@benchmark.Enabled('android')
+@benchmark.Owner(emails=['kouhei@chromium.org', 'ksakamoto@chromium.org'])
+class LoadingMobile(_LoadingBase):
+ """ A benchmark measuring loading performance of mobile sites. """
+
@classmethod
def ShouldDisable(cls, possible_browser):
# crbug.com/619254
@@ -52,17 +56,12 @@ class LoadingMobile(perf_benchmark.PerfBenchmark):
# Disabled because we do not plan on running CT benchmarks on the perf
# waterfall any time soon.
@benchmark.Disabled('all')
-class LoadingClusterTelemetry(perf_benchmark.PerfBenchmark):
+class LoadingClusterTelemetry(_LoadingBase):
options = {'upload_results': True}
_ALL_NET_CONFIGS = traffic_setting.NETWORK_CONFIGS.keys()
- def CreateTimelineBasedMeasurementOptions(self):
- tbm_options = timeline_based_measurement.Options()
- page_cycler_v2.AugmentOptionsForLoadingMetrics(tbm_options)
- return tbm_options
-
@classmethod
def Name(cls):
return 'loading.cluster_telemetry'
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698