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

Side by Side Diff: tools/perf/benchmarks/benchmark_smoke_unittest.py

Issue 737403002: Revert of telemetry: Remove command line args from page test (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 1 month 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
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance.py ('k') | tools/perf/benchmarks/page_cycler.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 The Chromium Authors. All rights reserved. 1 # Copyright 2014 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 """Run the first page of one benchmark for every module. 5 """Run the first page of one benchmark for every module.
6 6
7 Only benchmarks that have a composable measurement are included. 7 Only benchmarks that have a composable measurement are included.
8 Ideally this test would be comprehensive, however, running one page 8 Ideally this test would be comprehensive, however, running one page
9 of every benchmark would run impractically long. 9 of every benchmark would run impractically long.
10 """ 10 """
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 measurements_dir = os.path.join(top_level_dir, 'measurements') 70 measurements_dir = os.path.join(top_level_dir, 'measurements')
71 71
72 all_measurements = discover.DiscoverClasses( 72 all_measurements = discover.DiscoverClasses(
73 measurements_dir, top_level_dir, page_test.PageTest).values() 73 measurements_dir, top_level_dir, page_test.PageTest).values()
74 # Using the default of |index_by_class_name=False| means that if a module 74 # Using the default of |index_by_class_name=False| means that if a module
75 # has multiple benchmarks, only the last one is returned. 75 # has multiple benchmarks, only the last one is returned.
76 all_benchmarks = discover.DiscoverClasses( 76 all_benchmarks = discover.DiscoverClasses(
77 benchmarks_dir, top_level_dir, benchmark_module.Benchmark, 77 benchmarks_dir, top_level_dir, benchmark_module.Benchmark,
78 index_by_class_name=False).values() 78 index_by_class_name=False).values()
79 for benchmark in all_benchmarks: 79 for benchmark in all_benchmarks:
80 if hasattr(benchmark, 'test') and benchmark.test not in all_measurements: 80 if benchmark.PageTestClass() not in all_measurements:
81 # If the benchmark does not have a measurement, then it is not composable. 81 # If the benchmark is not in measurements, then it is not composable.
82 # Ideally we'd like to test these as well, but the non-composable 82 # Ideally we'd like to test these as well, but the non-composable
83 # benchmarks are usually long-running benchmarks. 83 # benchmarks are usually long-running benchmarks.
84 continue 84 continue
85 85
86 # TODO(tonyg): Smoke doesn't work with session_restore yet. 86 # TODO(tonyg): Smoke doesn't work with session_restore yet.
87 if (benchmark.Name().startswith('session_restore') or 87 if (benchmark.Name().startswith('session_restore') or
88 benchmark.Name().startswith('skpicture_printer')): 88 benchmark.Name().startswith('skpicture_printer')):
89 continue 89 continue
90 90
91 if hasattr(benchmark, 'generated_profile_archive'): 91 if hasattr(benchmark, 'generated_profile_archive'):
(...skipping 13 matching lines...) Expand all
105 # in a class, and then throw the ones we don't need away instead. 105 # in a class, and then throw the ones we don't need away instead.
106 if hasattr(benchmark, '_enabled_strings'): 106 if hasattr(benchmark, '_enabled_strings'):
107 method._enabled_strings = benchmark._enabled_strings 107 method._enabled_strings = benchmark._enabled_strings
108 if hasattr(benchmark, '_disabled_strings'): 108 if hasattr(benchmark, '_disabled_strings'):
109 method._disabled_strings = benchmark._disabled_strings 109 method._disabled_strings = benchmark._disabled_strings
110 setattr(BenchmarkSmokeTest, benchmark.Name(), method) 110 setattr(BenchmarkSmokeTest, benchmark.Name(), method)
111 111
112 suite.addTest(BenchmarkSmokeTest(benchmark.Name())) 112 suite.addTest(BenchmarkSmokeTest(benchmark.Name()))
113 113
114 return suite 114 return suite
OLDNEW
« no previous file with comments | « content/test/gpu/gpu_tests/webgl_conformance.py ('k') | tools/perf/benchmarks/page_cycler.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698