OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2016 The Chromium Authors. All rights reserved. | 2 # Copyright 2016 The Chromium Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # pylint: disable=too-many-lines | 6 # pylint: disable=too-many-lines |
7 | 7 |
8 """Script to generate chromium.perf.json and chromium.perf.fyi.json in | 8 """Script to generate chromium.perf.json and chromium.perf.fyi.json in |
9 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf | 9 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf |
10 directory. Maintaining these files by hand is too unwieldy. | 10 directory. Maintaining these files by hand is too unwieldy. |
11 """ | 11 """ |
12 import argparse | 12 import argparse |
13 import collections | 13 import collections |
14 import csv | 14 import csv |
15 import json | 15 import json |
16 import os | 16 import os |
17 import re | 17 import re |
18 import sys | 18 import sys |
19 import sets | 19 import sets |
20 | 20 |
21 | 21 |
22 from core import path_util | 22 from core import path_util |
23 path_util.AddTelemetryToPath() | 23 path_util.AddTelemetryToPath() |
24 | 24 |
25 from telemetry import benchmark as benchmark_module | 25 from telemetry import benchmark as benchmark_module |
26 from telemetry.core import discover | |
27 from telemetry import decorators | 26 from telemetry import decorators |
28 | 27 |
| 28 from py_utils import discover |
| 29 |
29 from core.sharding_map_generator import load_benchmark_sharding_map | 30 from core.sharding_map_generator import load_benchmark_sharding_map |
30 | 31 |
31 | 32 |
32 def add_builder(waterfall, name, additional_compile_targets=None): | 33 def add_builder(waterfall, name, additional_compile_targets=None): |
33 waterfall['builders'][name] = added = {} | 34 waterfall['builders'][name] = added = {} |
34 if additional_compile_targets: | 35 if additional_compile_targets: |
35 added['additional_compile_targets'] = additional_compile_targets | 36 added['additional_compile_targets'] = additional_compile_targets |
36 | 37 |
37 return waterfall | 38 return waterfall |
38 | 39 |
(...skipping 1041 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1080 return 0 | 1081 return 0 |
1081 else: | 1082 else: |
1082 print ('The perf JSON config files are not up-to-date. Please run %s ' | 1083 print ('The perf JSON config files are not up-to-date. Please run %s ' |
1083 'without --validate-only flag to update the perf JSON ' | 1084 'without --validate-only flag to update the perf JSON ' |
1084 'configs and benchmark.csv.') % sys.argv[0] | 1085 'configs and benchmark.csv.') % sys.argv[0] |
1085 return 1 | 1086 return 1 |
1086 else: | 1087 else: |
1087 update_all_tests([fyi_waterfall, waterfall]) | 1088 update_all_tests([fyi_waterfall, waterfall]) |
1088 update_benchmark_csv() | 1089 update_benchmark_csv() |
1089 return 0 | 1090 return 0 |
OLD | NEW |