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

Unified Diff: tools/perf/profile_creators/small_profile_creator.py

Issue 14359012: Telemetry: Add option to create a dirty profile as part of a test run (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Small fix to unit tests Created 7 years, 7 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 | « tools/perf/profile_creators/__init__.py ('k') | tools/perf/run_multipage_benchmarks » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/profile_creators/small_profile_creator.py
diff --git a/tools/perf/profile_creators/small_profile_creator.py b/tools/perf/profile_creators/small_profile_creator.py
new file mode 100644
index 0000000000000000000000000000000000000000..020f81f3fa466a6041db74c9759ed1be10e94cb3
--- /dev/null
+++ b/tools/perf/profile_creators/small_profile_creator.py
@@ -0,0 +1,23 @@
+# Copyright (c) 2013 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 os
+
+from telemetry.core import profile_creator
+from telemetry.page import page_set
+
+class SmallProfileCreator(profile_creator.ProfileCreator):
+ """
+ Runs a browser through a series of operations to fill in a small test profile.
+ """
+
+ def CreateProfile(self):
+ top_25 = os.path.join(os.path.dirname(__file__),
+ '..', 'page_sets', 'top_25.json')
+ pages_to_load = page_set.PageSet.FromFile(top_25)
+ tab = self._browser.tabs[0]
+ for page in pages_to_load:
+ tab.Navigate(page.url)
+ tab.WaitForDocumentReadyStateToBeComplete()
+ tab.Disconnect()
« no previous file with comments | « tools/perf/profile_creators/__init__.py ('k') | tools/perf/run_multipage_benchmarks » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698