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

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

Issue 1435243002: Re-implements start_with_url.* benchmarks as start_with_url2.* using TBM (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@b00
Patch Set: Fixes pasko's nits Created 5 years, 1 month 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 | tools/perf/page_sets/startup_pages.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/benchmarks/start_with_url2.py
diff --git a/tools/perf/benchmarks/start_with_url2.py b/tools/perf/benchmarks/start_with_url2.py
new file mode 100644
index 0000000000000000000000000000000000000000..a6747fb105ea2c68872f7b40239af4f2d9967042
--- /dev/null
+++ b/tools/perf/benchmarks/start_with_url2.py
@@ -0,0 +1,67 @@
+# Copyright 2015 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+from core import perf_benchmark
+import page_sets
+
+from telemetry import benchmark
+from telemetry.timeline import tracing_category_filter
+from telemetry.web_perf import timeline_based_measurement
+from telemetry.web_perf.metrics import startup
+
+
+class _StartWithUrlTBM(perf_benchmark.PerfBenchmark):
+ """Measures time to start Chrome with startup URLs."""
+
+ page_set = page_sets.StartupPagesPageSetTBM
+
+ @classmethod
+ def Name(cls):
+ # TODO(gabadie): change to start_with_url.* after confirming that both
+ # benchmarks produce the same results.
+ return 'start_with_url2.startup_pages'
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs([
+ '--enable-stats-collection-bindings'
+ ])
+
+ def CreateTimelineBasedMeasurementOptions(self):
+ startup_category_filter = tracing_category_filter.TracingCategoryFilter(
+ filter_string='startup,blink.user_timing')
+ options = timeline_based_measurement.Options(
+ overhead_level=startup_category_filter)
+ options.SetTimelineBasedMetrics(
+ [startup.StartupTimelineMetric()])
+ return options
+
+
+@benchmark.Enabled('has tabs')
+@benchmark.Enabled('android')
+@benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
+class StartWithUrlColdTBM(_StartWithUrlTBM):
+ """Measures time to start Chrome cold with startup URLs."""
+
+ options = {'pageset_repeat': 5}
+
+ def SetExtraBrowserOptions(self, options):
+ options.clear_sytem_cache_for_browser_and_profile_on_start = True
+ super(StartWithUrlColdTBM, self).SetExtraBrowserOptions(options)
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_url2.cold.startup_pages'
+
+
+@benchmark.Enabled('has tabs')
+@benchmark.Enabled('android')
+@benchmark.Disabled('chromeos', 'linux', 'mac', 'win')
+class StartWithUrlWarmTBM(_StartWithUrlTBM):
+ """Measures stimetime to start Chrome warm with startup URLs."""
+
+ options = {'pageset_repeat': 10}
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_url2.warm.startup_pages'
« no previous file with comments | « no previous file | tools/perf/page_sets/startup_pages.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698