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

Side by Side Diff: tools/telemetry/telemetry/core/discover.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 unified diff | Download patch
OLDNEW
1 # Copyright 2012 The Chromium Authors. All rights reserved. 1 # Copyright 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import fnmatch 5 import fnmatch
6 import inspect 6 import inspect
7 import os 7 import os
8 import re 8 import re
9 9
10 from telemetry import decorators 10 from telemetry import decorators
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 126
127 127
128 def IsPageSetFile(file_path): 128 def IsPageSetFile(file_path):
129 root_name, ext_name = os.path.splitext(file_path) 129 root_name, ext_name = os.path.splitext(file_path)
130 if 'unittest' in root_name or 'page_sets/data' in root_name: 130 if 'unittest' in root_name or 'page_sets/data' in root_name:
131 return False 131 return False
132 if ext_name != '.py': 132 if ext_name != '.py':
133 return False 133 return False
134 module = util.GetPythonPageSetModule(file_path) 134 module = util.GetPythonPageSetModule(file_path)
135 return bool(DiscoverClassesInModule(module, page_set.PageSet)) 135 return bool(DiscoverClassesInModule(module, page_set.PageSet))
136
137
138 def GetAllPageSetFilenames(dir_path):
139 results = []
140 for sub_path, _, filenames in os.walk(dir_path):
141 for f in filenames:
142 if f.startswith('.'):
143 continue
144 filename = os.path.join(sub_path, f)
145 if IsPageSetFile(filename):
146 results.append(filename)
147 return results
OLDNEW
« no previous file with comments | « tools/perf/profile_creators/theme_profile_creator.py ('k') | tools/telemetry/telemetry/page/extensions_profile_creator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698