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

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

Issue 1240703003: Extension profile generator + benchmark for startup with profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatting + fix to update_remote_extensions Created 5 years, 5 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/start_with_ext.py
diff --git a/tools/perf/benchmarks/start_with_ext.py b/tools/perf/benchmarks/start_with_ext.py
new file mode 100644
index 0000000000000000000000000000000000000000..1133b855117e9966e95bb624d829c3a081244b0b
--- /dev/null
+++ b/tools/perf/benchmarks/start_with_ext.py
@@ -0,0 +1,55 @@
+# 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
+from measurements import startup
+import page_sets
+from telemetry import benchmark
+
+
+class _StartWithExt(perf_benchmark.PerfBenchmark):
+ """Base Benchmark for testing startup with extensions. """
robliao 2015/07/16 18:33:23 Nit: Benchmark -> benchmark
sydli 2015/07/16 20:01:29 Done.
+ page_set = page_sets.BlankPageSetWithExtensionProfile
+ tag = None
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_ext.blank_page'
+
+ @classmethod
+ def ValueCanBeAddedPredicate(cls, _, is_first_result):
+ return not is_first_result
+
+ def SetExtraBrowserOptions(self, options):
+ options.disable_default_apps = False
+
+ def CreatePageTest(self, _):
+ is_cold = (self.tag == 'cold')
+ return startup.Startup(cold=is_cold)
+
robliao 2015/07/16 18:33:23 Add extra linebreak here (2 Blank Lines at Top Lev
sydli 2015/07/16 20:01:29 Done.
+@benchmark.Enabled('has tabs')
+@benchmark.Enabled('mac') # Currently only works on mac.
+@benchmark.Disabled('win', 'linux', 'reference', 'android')
+class StartWithExtCold(_StartWithExt):
+ """Measure time to start Chrome cold with extensions. """
+ options = {'pageset_repeat': 5}
+ tag = 'cold'
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_ext.cold.blank_page'
robliao 2015/07/16 18:33:23 Tabs: 2 spaces here.
sydli 2015/07/16 20:01:29 Done.
+
+
+@benchmark.Enabled('has tabs')
+@benchmark.Enabled('mac') # Currently only works on mac.
+@benchmark.Disabled('win', 'linux', 'reference', 'android')
+class StartWithExtWarm(_StartWithExt):
+ """Measure time to start Chrome warm with extensions. """
+ options = {'pageset_repeat': 20}
+ tag = 'warm'
+
+ @classmethod
+ def Name(cls):
+ return 'start_with_ext.warm.blank_page'
robliao 2015/07/16 18:33:23 Tabs: 2 spaces here
sydli 2015/07/16 20:01:29 Done.
+

Powered by Google App Engine
This is Rietveld 408576698