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

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

Issue 2840213003: Move blink_perf.xml_http_request benchmark to tools/perf/contrib/ directory (Closed)
Patch Set: Simplify benchmark_finders code 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
« no previous file with comments | « tools/perf/core/path_util.py ('k') | tools/perf/run_benchmark » ('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 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 4
5 import argparse 5 import argparse
6 import base64 6 import base64
7 import gzip 7 import gzip
8 import io 8 import io
9 import json 9 import json
10 import logging 10 import logging
11 import os 11 import os
12 import platform 12 import platform
13 import subprocess 13 import subprocess
14 import tempfile 14 import tempfile
15 import urllib 15 import urllib
16 import urllib2 16 import urllib2
17 17
18 18
19 from core import benchmark_finders
19 from core import path_util 20 from core import path_util
20 21
21 from telemetry import benchmark 22 from telemetry import benchmark
22 from telemetry import decorators 23 from telemetry import decorators
23 from telemetry.core import discover
24 from telemetry.util import command_line 24 from telemetry.util import command_line
25 from telemetry.util import matching 25 from telemetry.util import matching
26 26
27 27
28 # Unsupported Perf bisect bots. 28 # Unsupported Perf bisect bots.
29 EXCLUDED_BOTS = { 29 EXCLUDED_BOTS = {
30 'win_xp_perf_bisect', # Goma issues: crbug.com/330900 30 'win_xp_perf_bisect', # Goma issues: crbug.com/330900
31 'win_perf_bisect_builder', 31 'win_perf_bisect_builder',
32 'win64_nv_tester', 32 'win64_nv_tester',
33 'winx64_bisect_builder', 33 'winx64_bisect_builder',
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 'options available except the --browser option'), 264 'options available except the --browser option'),
265 formatter_class=argparse.RawTextHelpFormatter) 265 formatter_class=argparse.RawTextHelpFormatter)
266 return parser 266 return parser
267 267
268 @classmethod 268 @classmethod
269 def ProcessCommandLineArgs(cls, parser, options, extra_args, environment): 269 def ProcessCommandLineArgs(cls, parser, options, extra_args, environment):
270 del environment # unused 270 del environment # unused
271 for arg in extra_args: 271 for arg in extra_args:
272 if arg == '--browser' or arg.startswith('--browser='): 272 if arg == '--browser' or arg.startswith('--browser='):
273 parser.error('--browser=... is not allowed when running trybot.') 273 parser.error('--browser=... is not allowed when running trybot.')
274 all_benchmarks = discover.DiscoverClasses( 274 all_benchmarks = benchmark_finders.GetAllPerfBenchmarks()
275 start_dir=path_util.GetPerfBenchmarksDir(), 275 all_benchmarks.extend(benchmark_finders.GetAllContribBenchmarks())
276 top_level_dir=path_util.GetPerfDir(),
277 base_class=benchmark.Benchmark).values()
278 all_benchmark_names = [b.Name() for b in all_benchmarks] 276 all_benchmark_names = [b.Name() for b in all_benchmarks]
279 all_benchmarks_by_names = {b.Name(): b for b in all_benchmarks} 277 all_benchmarks_by_names = {b.Name(): b for b in all_benchmarks}
280 benchmark_class = all_benchmarks_by_names.get(options.benchmark_name, None) 278 benchmark_class = all_benchmarks_by_names.get(options.benchmark_name, None)
281 if not benchmark_class: 279 if not benchmark_class:
282 possible_benchmark_names = matching.GetMostLikelyMatchedObject( 280 possible_benchmark_names = matching.GetMostLikelyMatchedObject(
283 all_benchmark_names, options.benchmark_name) 281 all_benchmark_names, options.benchmark_name)
284 parser.error( 282 parser.error(
285 'No benchmark named "%s". Do you mean any of those benchmarks ' 283 'No benchmark named "%s". Do you mean any of those benchmarks '
286 'below?\n%s' % ( 284 'below?\n%s' % (
287 options.benchmark_name, '\n'.join(possible_benchmark_names))) 285 options.benchmark_name, '\n'.join(possible_benchmark_names)))
(...skipping 348 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 # Add deps overrides to git try --properties arg. 634 # Add deps overrides to git try --properties arg.
637 if deps_override: 635 if deps_override:
638 git_try_command.extend([ 636 git_try_command.extend([
639 '-p', 'deps_revision_overrides=%s' % json.dumps(deps_override)]) 637 '-p', 'deps_revision_overrides=%s' % json.dumps(deps_override)])
640 error_msg_on_fail += ' with DEPS override (%s)' % deps_override 638 error_msg_on_fail += ' with DEPS override (%s)' % deps_override
641 for bot in self._builder_names[bot_platform]: 639 for bot in self._builder_names[bot_platform]:
642 git_try_command.extend(['-b', bot]) 640 git_try_command.extend(['-b', bot])
643 641
644 RunGit(git_try_command, error_msg_on_fail) 642 RunGit(git_try_command, error_msg_on_fail)
645 print 'Perf Try job sent to rietveld for %s platform.' % bot_platform 643 print 'Perf Try job sent to rietveld for %s platform.' % bot_platform
OLDNEW
« no previous file with comments | « tools/perf/core/path_util.py ('k') | tools/perf/run_benchmark » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698