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

Side by Side Diff: tools/perf/core/benchmark_finders.py

Issue 2840213003: Move blink_perf.xml_http_request benchmark to tools/perf/contrib/ directory (Closed)
Patch Set: Make sure that trybot include contrib dir Created 3 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 unified diff | Download patch
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import imp 4 import imp
5 import inspect 5 import inspect
6 import os 6 import os
7 import sys 7 import sys
8 8
9 from core import path_util 9 from core import path_util
10 from core import perf_benchmark 10 from core import perf_benchmark
(...skipping 27 matching lines...) Expand all
38 if (inspect.isclass(obj) and issubclass(obj, perf_benchmark.PerfBenchmark) 38 if (inspect.isclass(obj) and issubclass(obj, perf_benchmark.PerfBenchmark)
39 and GetClassFilePath(obj) == benchmark_file_dir): 39 and GetClassFilePath(obj) == benchmark_file_dir):
40 benchmark_names.append(obj.Name()) 40 benchmark_names.append(obj.Name())
41 return sorted(benchmark_names) 41 return sorted(benchmark_names)
42 finally: 42 finally:
43 sys.path = original_sys_path 43 sys.path = original_sys_path
44 44
45 45
46 def GetAllPerfBenchmarks(): 46 def GetAllPerfBenchmarks():
47 benchmarks_dir = path_util.GetPerfBenchmarksDir() 47 benchmarks_dir = path_util.GetPerfBenchmarksDir()
48 top_level_dir = os.path.join(benchmarks_dir, '..') 48 top_level_dir = os.path.join(path_util.GetPerfDir())
shatch 2017/04/26 14:37:30 nit: is this join necessary now
nednguyen 2017/04/26 14:42:51 Oh right, silly me :P
49 return discover.DiscoverClasses( 49 return discover.DiscoverClasses(
50 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, 50 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
51 index_by_class_name=True).values() 51 index_by_class_name=True).values()
52
53
54 def GetAllContribBenchmarks():
55 benchmarks_dir = path_util.GetPerfContribDir()
56 top_level_dir = os.path.join(path_util.GetPerfDir())
57 return discover.DiscoverClasses(
58 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
59 index_by_class_name=True).values()
OLDNEW
« no previous file with comments | « tools/perf/contrib/blink_perf_xml_http_request/blink_perf_xml_http_request.py ('k') | tools/perf/core/path_util.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698