| 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 """Script to generate chromium.perf.json and chromium.perf.fyi.json in | 6 """Script to generate chromium.perf.json and chromium.perf.fyi.json in |
| 7 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf | 7 the src/testing/buildbot directory and benchmark.csv in the src/tools/perf |
| 8 directory. Maintaining these files by hand is too unwieldy. | 8 directory. Maintaining these files by hand is too unwieldy. |
| 9 """ | 9 """ |
| 10 import argparse | 10 import argparse |
| 11 import collections | 11 import collections |
| 12 import csv | 12 import csv |
| 13 import json | 13 import json |
| 14 import os | 14 import os |
| 15 import re | 15 import re |
| 16 import sys | 16 import sys |
| 17 import sets | 17 import sets |
| 18 | 18 |
| 19 from core import path_util | 19 from chrome_telemetry_build import chromium_config |
| 20 path_util.AddTelemetryToPath() | |
| 21 | 20 |
| 21 sys.path.append(chromium_config.GetTelemetryDir()) |
| 22 from telemetry import benchmark as benchmark_module | 22 from telemetry import benchmark as benchmark_module |
| 23 from telemetry import decorators | 23 from telemetry import decorators |
| 24 from telemetry.core import discover | 24 from telemetry.core import discover |
| 25 from telemetry.util import bot_utils | 25 from telemetry.util import bot_utils |
| 26 | 26 |
| 27 | 27 |
| 28 SCRIPT_TESTS = [ | 28 SCRIPT_TESTS = [ |
| 29 { | 29 { |
| 30 'args': [ | 30 'args': [ |
| 31 'gpu_perftests', | 31 'gpu_perftests', |
| (...skipping 934 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 966 return 0 | 966 return 0 |
| 967 else: | 967 else: |
| 968 print ('The perf JSON config files are not up-to-date. Please run %s ' | 968 print ('The perf JSON config files are not up-to-date. Please run %s ' |
| 969 'without --validate-only flag to update the perf JSON ' | 969 'without --validate-only flag to update the perf JSON ' |
| 970 'configs and benchmark.csv.') % sys.argv[0] | 970 'configs and benchmark.csv.') % sys.argv[0] |
| 971 return 1 | 971 return 1 |
| 972 else: | 972 else: |
| 973 update_all_tests([fyi_waterfall, waterfall]) | 973 update_all_tests([fyi_waterfall, waterfall]) |
| 974 update_benchmark_csv() | 974 update_benchmark_csv() |
| 975 return 0 | 975 return 0 |
| OLD | NEW |