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

Side by Side Diff: tools/nanobench_flags.py

Issue 1612483002: Add pre_log option to nanobench; make this option default true in nanobench and dm. (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: Revert change to enable --pre_log for --verbose. Add auto-edited files. Created 4 years, 11 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/nanobench_flags.json ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # 1 #
2 # Copyright 2015 Google Inc. 2 # Copyright 2015 Google Inc.
3 # 3 #
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 # 6 #
7 7
8 #!/usr/bin/env python 8 #!/usr/bin/env python
9 9
10 usage = ''' 10 usage = '''
11 Write extra flags to outfile for nanobench based on the bot name: 11 Write extra flags to outfile for nanobench based on the bot name:
12 $ python nanobench_flags.py outfile Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7 -Release 12 $ python nanobench_flags.py outfile Perf-Android-GCC-GalaxyS3-GPU-Mali400-Arm7 -Release
13 Or run self-tests: 13 Or run self-tests:
14 $ python nanobench_flags.py test 14 $ python nanobench_flags.py test
15 ''' 15 '''
16 16
17 import inspect 17 import inspect
18 import json 18 import json
19 import os 19 import os
20 import sys 20 import sys
21 21
22 22
23 def lineno(): 23 def lineno():
24 caller = inspect.stack()[1] # Up one level to our caller. 24 caller = inspect.stack()[1] # Up one level to our caller.
25 return inspect.getframeinfo(caller[0]).lineno 25 return inspect.getframeinfo(caller[0]).lineno
26 26
27 27
28 cov_start = lineno()+1 # We care about coverage starting just past this def. 28 cov_start = lineno()+1 # We care about coverage starting just past this def.
29 def get_args(bot): 29 def get_args(bot):
30 args = [] 30 args = ['--pre_log']
31 31
32 if 'GPU' in bot: 32 if 'GPU' in bot:
33 args.append('--images') 33 args.append('--images')
34 args.extend(['--gpuStatsDump', 'true']) 34 args.extend(['--gpuStatsDump', 'true'])
35 35
36 if 'Appurify' not in bot: 36 if 'Appurify' not in bot:
37 args.extend(['--scales', '1.0', '1.1']) 37 args.extend(['--scales', '1.0', '1.1'])
38 38
39 if 'iOS' in bot: 39 if 'iOS' in bot:
40 args.extend(['--skps', 'ignore_skps']) 40 args.extend(['--skps', 'ignore_skps'])
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
159 if len(sys.argv) == 2 and sys.argv[1] == 'test': 159 if len(sys.argv) == 2 and sys.argv[1] == 'test':
160 self_test() 160 self_test()
161 sys.exit(0) 161 sys.exit(0)
162 162
163 if len(sys.argv) != 3: 163 if len(sys.argv) != 3:
164 print usage 164 print usage
165 sys.exit(1) 165 sys.exit(1)
166 166
167 with open(sys.argv[1], 'w') as out: 167 with open(sys.argv[1], 'w') as out:
168 json.dump(get_args(sys.argv[2]), out) 168 json.dump(get_args(sys.argv[2]), out)
OLDNEW
« no previous file with comments | « tools/nanobench_flags.json ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698