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

Side by Side Diff: tools/skpbench/_benchresult.py

Issue 2369533002: Add Pixel C knobs to skpbench (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | tools/skpbench/_hardware.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 Google Inc. 1 # Copyright 2016 Google Inc.
2 # 2 #
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 '''Parses an skpbench result from a line of output text.''' 6 """Parses an skpbench result from a line of output text."""
7 7
8 from __future__ import print_function 8 from __future__ import print_function
9 import re 9 import re
10 import sys 10 import sys
11 11
12 class BenchResult: 12 class BenchResult:
13 FLOAT_REGEX = '[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?' 13 FLOAT_REGEX = '[-+]?(\d+(\.\d*)?|\.\d+)([eE][-+]?\d+)?'
14 PATTERN = re.compile('^(?P<median_pad> *)' 14 PATTERN = re.compile('^(?P<median_pad> *)'
15 '(?P<median>' + FLOAT_REGEX + ')' 15 '(?P<median>' + FLOAT_REGEX + ')'
16 '(?P<accum_pad> +)' 16 '(?P<accum_pad> +)'
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 values = list() 60 values = list()
61 for name in ['median', 'accum', 'max', 'min', 'stddev', 61 for name in ['median', 'accum', 'max', 'min', 'stddev',
62 'metric', 'samples', 'sample_ms', 'config']: 62 'metric', 'samples', 'sample_ms', 'config']:
63 values.append(self.get_string(name + '_pad')) 63 values.append(self.get_string(name + '_pad'))
64 values.append(self.get_string(name)) 64 values.append(self.get_string(name))
65 values.append(config_suffix) 65 values.append(config_suffix)
66 bench_pad = self.get_string('bench_pad') 66 bench_pad = self.get_string('bench_pad')
67 values.append(bench_pad[min(len(config_suffix), len(bench_pad) - 1):]) 67 values.append(bench_pad[min(len(config_suffix), len(bench_pad) - 1):])
68 values.append(self.get_string('bench')) 68 values.append(self.get_string('bench'))
69 print(''.join(values), file=outfile) 69 print(''.join(values), file=outfile)
OLDNEW
« no previous file with comments | « no previous file | tools/skpbench/_hardware.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698