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

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: Removes outdated comment 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') | tools/perf/page_sets/startup_pages.py » ('J')
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..9e66714d57de47ba78e5630ab18f41cddf592d25
--- /dev/null
+++ b/tools/perf/benchmarks/start_with_url2.py
@@ -0,0 +1,75 @@
+# Copyright 2014 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.
+
+import page_sets
+from core import perf_benchmark
+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
+from metrics import keychain_metric
+
+
+class _StartWithUrlTBM(perf_benchmark.PerfBenchmark):
+ page_set = page_sets.StartupPagesPageSetTBM
+
+ @classmethod
+ def Name(cls):
+ # TODO(gabadie): We don't want to replace start_with_url.* yet.
+ return 'start_with_url2.startup_pages'
+
+ def SetExtraBrowserOptions(self, options):
+ options.AppendExtraBrowserArgs([
+ '--enable-stats-collection-bindings'
+ ])
+ keychain_metric.KeychainMetric.CustomizeBrowserOptions(options)
eakuefner 2015/11/17 16:51:52 You probably don't need this since you're not coll
gabadie 2015/11/17 18:14:23 Done.
+
+ 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):
+ """Measure 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):
+ """Measure time to start Chrome warm with startup URLs"""
+ options = {'pageset_repeat': 10}
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_url2.warm.startup_pages'
+
+ # TODO(gabadie): Uncomment this method and pageset_repeat++. This a current
eakuefner 2015/11/17 16:51:52 Please don't leave commented code in your CL like
gabadie 2015/11/17 18:14:23 Done. Created crbug.com/557242.
+ # bug discovered in start_with_url where the results in the first page set
+ # iterations are actually cold because the profile was empty. However we
+ # don't want to fix right now because we want to make sure first that
+ # start_with_url2.* have same values as start_with_url.* before fixing this
+ # bug (pasko@chromium.org).
+ # @classmethod
+ # def ValueCanBeAddedPredicate(cls, _, is_first_result):
+ # # Ignores first results because the first invocation is actualy cold since
+ # # we are loading the profile for the first time.
+ # return not is_first_result
« no previous file with comments | « no previous file | tools/perf/page_sets/startup_pages.py » ('j') | tools/perf/page_sets/startup_pages.py » ('J')

Powered by Google App Engine
This is Rietveld 408576698