| OLD | NEW |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 | 5 |
| 6 # Recipe module for Skia Swarming perf. | 6 # Recipe module for Skia Swarming perf. |
| 7 | 7 |
| 8 | 8 |
| 9 DEPS = [ | 9 DEPS = [ |
| 10 'build/file', | 10 'build/file', |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', | 37 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', |
| 38 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', | 38 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', |
| 39 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', | 39 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', |
| 40 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', | 40 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', |
| 41 'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', | 41 'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', |
| 42 ], | 42 ], |
| 43 }, | 43 }, |
| 44 } | 44 } |
| 45 | 45 |
| 46 | 46 |
| 47 import calendar | 47 import time |
| 48 | 48 |
| 49 | 49 |
| 50 def nanobench_flags(bot): | 50 def nanobench_flags(bot): |
| 51 args = ['--pre_log'] | 51 args = ['--pre_log'] |
| 52 | 52 |
| 53 if 'GPU' in bot: | 53 if 'GPU' in bot: |
| 54 args.append('--images') | 54 args.append('--images') |
| 55 args.extend(['--gpuStatsDump', 'true']) | 55 args.extend(['--gpuStatsDump', 'true']) |
| 56 | 56 |
| 57 if 'Android' in bot and 'GPU' in bot: | 57 if 'Android' in bot and 'GPU' in bot: |
| (...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 ]) | 183 ]) |
| 184 | 184 |
| 185 target = 'nanobench' | 185 target = 'nanobench' |
| 186 if 'VisualBench' in api.vars.builder_name: | 186 if 'VisualBench' in api.vars.builder_name: |
| 187 target = 'visualbench' | 187 target = 'visualbench' |
| 188 args = [ | 188 args = [ |
| 189 target, | 189 target, |
| 190 '--undefok', # This helps branches that may not know new flags. | 190 '--undefok', # This helps branches that may not know new flags. |
| 191 '-i', api.flavor.device_dirs.resource_dir, | 191 '-i', api.flavor.device_dirs.resource_dir, |
| 192 '--skps', api.flavor.device_dirs.skp_dir, | 192 '--skps', api.flavor.device_dirs.skp_dir, |
| 193 '--svgs', api.flavor.device_dirs.svg_dir, | |
| 194 '--images', api.flavor.device_path_join( | 193 '--images', api.flavor.device_path_join( |
| 195 api.flavor.device_dirs.images_dir, 'nanobench'), | 194 api.flavor.device_dirs.images_dir, 'nanobench'), |
| 196 ] | 195 ] |
| 197 | 196 |
| 197 # Do not run svgs on Valgrind. |
| 198 if 'Valgrind' not in api.vars.builder_name: |
| 199 args.extend(['--svgs', api.flavor.device_dirs.svg_dir]) |
| 200 |
| 198 skip_flag = None | 201 skip_flag = None |
| 199 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': | 202 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
| 200 skip_flag = '--nogpu' | 203 skip_flag = '--nogpu' |
| 201 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': | 204 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
| 202 skip_flag = '--nocpu' | 205 skip_flag = '--nocpu' |
| 203 if skip_flag: | 206 if skip_flag: |
| 204 args.append(skip_flag) | 207 args.append(skip_flag) |
| 205 args.extend(nanobench_flags(api.vars.builder_name)) | 208 args.extend(nanobench_flags(api.vars.builder_name)) |
| 206 | 209 |
| 207 if api.vars.upload_perf_results: | 210 if api.vars.upload_perf_results: |
| 208 now = api.time.utcnow() | 211 now = api.time.utcnow() |
| 209 ts = int(calendar.timegm(now.utctimetuple())) | 212 ts = int(time.mktime(now.utctimetuple())) |
| 210 json_path = api.flavor.device_path_join( | 213 json_path = api.flavor.device_path_join( |
| 211 api.flavor.device_dirs.perf_data_dir, | 214 api.flavor.device_dirs.perf_data_dir, |
| 212 'nanobench_%s_%d.json' % (api.vars.got_revision, ts)) | 215 'nanobench_%s_%d.json' % (api.vars.got_revision, ts)) |
| 213 args.extend(['--outResultsFile', json_path]) | 216 args.extend(['--outResultsFile', json_path]) |
| 214 args.extend(properties) | 217 args.extend(properties) |
| 215 | 218 |
| 216 keys_blacklist = ['configuration', 'role', 'is_trybot'] | 219 keys_blacklist = ['configuration', 'role', 'is_trybot'] |
| 217 args.append('--key') | 220 args.append('--key') |
| 218 for k in sorted(api.vars.builder_cfg.keys()): | 221 for k in sorted(api.vars.builder_cfg.keys()): |
| 219 if not k in keys_blacklist: | 222 if not k in keys_blacklist: |
| (...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 320 buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' + | 323 buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' + |
| 321 'Valgrind-Trybot', | 324 'Valgrind-Trybot', |
| 322 mastername='client.skia', | 325 mastername='client.skia', |
| 323 slavename='skiabot-linux-swarm-000', | 326 slavename='skiabot-linux-swarm-000', |
| 324 buildnumber=5, | 327 buildnumber=5, |
| 325 path_config='kitchen', | 328 path_config='kitchen', |
| 326 swarm_out_dir='[SWARM_OUT_DIR]', | 329 swarm_out_dir='[SWARM_OUT_DIR]', |
| 327 revision='abc123', | 330 revision='abc123', |
| 328 **gerrit_kwargs) | 331 **gerrit_kwargs) |
| 329 ) | 332 ) |
| OLD | NEW |