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

Unified Diff: tools/perf/page_sets/extension_profile_shared_state.py

Issue 1240703003: Extension profile generator + benchmark for startup with profile. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: 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/page_sets/extension_profile_shared_state.py
diff --git a/tools/perf/page_sets/extension_profile_shared_state.py b/tools/perf/page_sets/extension_profile_shared_state.py
new file mode 100644
index 0000000000000000000000000000000000000000..af763727b661985cb5757f27fdda2a3b51c4535b
--- /dev/null
+++ b/tools/perf/page_sets/extension_profile_shared_state.py
@@ -0,0 +1,23 @@
+# 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 profile_creators import profile_generator
+from profile_creators import extension_profile_extender
+from telemetry.page import shared_page_state
+
+
+class ExtensionProfileSharedState(shared_page_state.SharedPageState):
+ def __init__(self, test, finder_options, story_set):
+ super(ExtensionProfileSharedState, self).__init__(
+ test, finder_options, story_set)
+ generator = profile_generator.ProfileGenerator(
+ extension_profile_extender.ExtensionProfileExtender,
+ "extension_profile")
+ out_dir = generator.Run(finder_options)
erikchen 2015/07/14 23:36:14 Does this directory end up leaking? Does it magica
sydli 2015/07/15 22:56:23 Suppose it's "magically cached" since python's tem
+ print out_dir
erikchen 2015/07/14 23:36:14 Did you mean to use a log statement here?
sydli 2015/07/15 22:56:23 Yeah; although I realize it's redundant since gene
+ if out_dir:
+ finder_options.browser_options.profile_dir = out_dir
+ else:
+ finder_options.browser_options.dont_override_profile = True
+

Powered by Google App Engine
This is Rietveld 408576698