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

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

Issue 311193003: [telemetry] Cleanups for benchmarks importing page sets. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove description fo' realz. (from gpu tests) Created 6 years, 6 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/benchmarks/smoothness.py ('k') | tools/perf/page_sets/blank_page.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/perf/page_sets/__init__.py
diff --git a/tools/perf/page_sets/__init__.py b/tools/perf/page_sets/__init__.py
index efcc9c35d2400dba3428197c75b08b1bb64b1b81..36a23b43274917573f2ba939d7e0eeffdddd5422 100644
--- a/tools/perf/page_sets/__init__.py
+++ b/tools/perf/page_sets/__init__.py
@@ -1,3 +1,19 @@
-# Copyright 2012 The Chromium Authors. All rights reserved.
+# 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 inspect
+import os
+import sys
+
+from telemetry.core import discover
+from telemetry.page import page_set
+
+
+# Import all submodules' PageSet classes.
+start_dir = os.path.dirname(os.path.abspath(__file__))
+top_level_dir = os.path.dirname(start_dir)
+base_class = page_set.PageSet
+for cls in discover.DiscoverClasses(
+ start_dir, top_level_dir, base_class).values():
+ setattr(sys.modules[__name__], cls.__name__, cls)
« no previous file with comments | « tools/perf/benchmarks/smoothness.py ('k') | tools/perf/page_sets/blank_page.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698