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', |
11 'core', | 11 'core', |
12 'recipe_engine/json', | 12 'recipe_engine/json', |
13 'recipe_engine/path', | 13 'recipe_engine/path', |
14 'recipe_engine/platform', | 14 'recipe_engine/platform', |
15 'recipe_engine/properties', | 15 'recipe_engine/properties', |
16 'recipe_engine/raw_io', | 16 'recipe_engine/raw_io', |
| 17 'recipe_engine/time', |
17 'run', | 18 'run', |
18 'flavor', | 19 'flavor', |
19 'vars', | 20 'vars', |
20 ] | 21 ] |
21 | 22 |
22 | 23 |
23 TEST_BUILDERS = { | 24 TEST_BUILDERS = { |
24 'client.skia': { | 25 'client.skia': { |
25 'skiabot-linux-swarm-000': [ | 26 'skiabot-linux-swarm-000': [ |
26 ('Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug' + | 27 ('Perf-Android-Clang-NVIDIA_Shield-GPU-TegraX1-arm64-Debug' + |
27 '-GN_Android_Vulkan'), | 28 '-GN_Android_Vulkan'), |
28 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android', | 29 'Perf-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android', |
29 'Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android', | 30 'Perf-Android-Clang-Nexus6-GPU-Adreno420-arm-Release-GN_Android', |
30 'Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android', | 31 'Perf-Android-Clang-Nexus7-GPU-Tegra3-arm-Release-GN_Android', |
31 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android', | 32 'Perf-Android-Clang-NexusPlayer-GPU-PowerVR-x86-Release-GN_Android', |
32 'Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN', | 33 'Perf-Mac-Clang-MacMini6.2-CPU-AVX-x86_64-Release-GN', |
33 'Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', | 34 'Perf-Mac-Clang-MacMini6.2-GPU-HD4000-x86_64-Debug-CommandBuffer', |
34 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN', | 35 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-GN', |
35 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', | 36 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-Valgrind', |
36 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', | 37 'Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-VisualBench', |
37 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', | 38 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Debug', |
38 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', | 39 'Perf-Win-MSVC-GCE-CPU-AVX2-x86_64-Release', |
39 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', | 40 'Perf-Win8-MSVC-ShuttleB-GPU-HD4600-x86_64-Release-Trybot', |
40 'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', | 41 'Perf-iOS-Clang-iPad4-GPU-SGX554-Arm7-Debug', |
41 ], | 42 ], |
42 }, | 43 }, |
43 } | 44 } |
44 | 45 |
45 | 46 |
| 47 import time |
| 48 |
| 49 |
46 def nanobench_flags(bot): | 50 def nanobench_flags(bot): |
47 args = ['--pre_log'] | 51 args = ['--pre_log'] |
48 | 52 |
49 if 'GPU' in bot: | 53 if 'GPU' in bot: |
50 args.append('--images') | 54 args.append('--images') |
51 args.extend(['--gpuStatsDump', 'true']) | 55 args.extend(['--gpuStatsDump', 'true']) |
52 | 56 |
53 if 'Android' in bot and 'GPU' in bot: | 57 if 'Android' in bot and 'GPU' in bot: |
54 args.extend(['--useThermalManager', '1,1,10,1000']) | 58 args.extend(['--useThermalManager', '1,1,10,1000']) |
55 | 59 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
194 skip_flag = None | 198 skip_flag = None |
195 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': | 199 if api.vars.builder_cfg.get('cpu_or_gpu') == 'CPU': |
196 skip_flag = '--nogpu' | 200 skip_flag = '--nogpu' |
197 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': | 201 elif api.vars.builder_cfg.get('cpu_or_gpu') == 'GPU': |
198 skip_flag = '--nocpu' | 202 skip_flag = '--nocpu' |
199 if skip_flag: | 203 if skip_flag: |
200 args.append(skip_flag) | 204 args.append(skip_flag) |
201 args.extend(nanobench_flags(api.vars.builder_name)) | 205 args.extend(nanobench_flags(api.vars.builder_name)) |
202 | 206 |
203 if api.vars.upload_perf_results: | 207 if api.vars.upload_perf_results: |
| 208 now = api.time.utcnow() |
| 209 ts = int(time.mktime(now.utctimetuple())) |
204 json_path = api.flavor.device_path_join( | 210 json_path = api.flavor.device_path_join( |
205 api.flavor.device_dirs.perf_data_dir, | 211 api.flavor.device_dirs.perf_data_dir, |
206 'nanobench_%s.json' % api.vars.got_revision) | 212 'nanobench_%s_%d.json' % (api.vars.got_revision, ts)) |
207 args.extend(['--outResultsFile', json_path]) | 213 args.extend(['--outResultsFile', json_path]) |
208 args.extend(properties) | 214 args.extend(properties) |
209 | 215 |
210 keys_blacklist = ['configuration', 'role', 'is_trybot'] | 216 keys_blacklist = ['configuration', 'role', 'is_trybot'] |
211 args.append('--key') | 217 args.append('--key') |
212 for k in sorted(api.vars.builder_cfg.keys()): | 218 for k in sorted(api.vars.builder_cfg.keys()): |
213 if not k in keys_blacklist: | 219 if not k in keys_blacklist: |
214 args.extend([k, api.vars.builder_cfg[k]]) | 220 args.extend([k, api.vars.builder_cfg[k]]) |
215 | 221 |
216 api.run(api.flavor.step, target, cmd=args, | 222 api.run(api.flavor.step, target, cmd=args, |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
314 buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' + | 320 buildername='Perf-Ubuntu-GCC-ShuttleA-GPU-GTX550Ti-x86_64-Release-' + |
315 'Valgrind-Trybot', | 321 'Valgrind-Trybot', |
316 mastername='client.skia', | 322 mastername='client.skia', |
317 slavename='skiabot-linux-swarm-000', | 323 slavename='skiabot-linux-swarm-000', |
318 buildnumber=5, | 324 buildnumber=5, |
319 path_config='kitchen', | 325 path_config='kitchen', |
320 swarm_out_dir='[SWARM_OUT_DIR]', | 326 swarm_out_dir='[SWARM_OUT_DIR]', |
321 revision='abc123', | 327 revision='abc123', |
322 **gerrit_kwargs) | 328 **gerrit_kwargs) |
323 ) | 329 ) |
OLD | NEW |