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

Side by Side Diff: slave/skia_slave_scripts/bench_pictures.py

Issue 311433002: Revert of Adds uploading picture benchmark JSON data (Closed) Base URL: https://skia.googlesource.com/buildbot.git@master
Patch Set: Created 6 years, 6 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 | slave/skia_slave_scripts/run_bench.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 #!/usr/bin/env python 1 #!/usr/bin/env python
2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 2 # Copyright (c) 2013 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 """ Run the Skia bench_pictures executable. """ 6 """ Run the Skia bench_pictures executable. """
7 7
8 from build_step import BuildStep
9 from run_bench import BenchArgs
8 import os 10 import os
9 import sys 11 import sys
10 12
11 from build_step import BuildStep
12 from run_bench import BenchArgs
13 from utils import gclient_utils
14
15 13
16 BENCH_REPEAT_COUNT = 10 14 BENCH_REPEAT_COUNT = 10
17 15
18 16
19 class BenchPictures(BuildStep): 17 class BenchPictures(BuildStep):
20 def __init__(self, timeout=16800, no_output_timeout=16800, **kwargs): 18 def __init__(self, timeout=16800, no_output_timeout=16800, **kwargs):
21 super(BenchPictures, self).__init__(timeout=timeout, 19 super(BenchPictures, self).__init__(timeout=timeout,
22 no_output_timeout=no_output_timeout, 20 no_output_timeout=no_output_timeout,
23 **kwargs) 21 **kwargs)
24 22
25 # pylint: disable=W0221 23 # pylint: disable=W0221
26 def _BuildDataFile(self, args): 24 def _BuildDataFile(self, args):
27 filename = '_'.join(['bench', self._got_revision, 25 filename = '_'.join(['bench', self._got_revision,
28 'data', 'skp'] + args) 26 'data', 'skp'] + args)
29 full_path = os.path.join(self._device_dirs.PerfDir(), 27 full_path = os.path.join(self._device_dirs.PerfDir(),
30 filename.replace('-', '').replace(':', '-')) 28 filename.replace('-', '').replace(':', '-'))
31 return full_path 29 return full_path
32 30
33 def _BuildJSONDataFile(self, args):
34 git_timestamp = gclient_utils.GetGitRepoPOSIXTimestamp()
35 return '{}_{}.json'.format(
36 self._BuildDataFile(args),
37 git_timestamp)
38
39 def _DoBenchPictures(self, args): 31 def _DoBenchPictures(self, args):
40 arguments = ['-r', self._device_dirs.SKPDir()] + args 32 arguments = ['-r', self._device_dirs.SKPDir()] + args
41 if self._perf_data_dir: 33 if self._perf_data_dir:
42 arguments.extend(BenchArgs(data_file=self._BuildDataFile(args))) 34 arguments.extend(BenchArgs(data_file=self._BuildDataFile(args)))
43 arguments.extend(['--jsonLog', self._BuildJSONDataFile(args)])
44 # For bench_pictures we use the --repeat and --logPerIter flags so that we 35 # For bench_pictures we use the --repeat and --logPerIter flags so that we
45 # can compensate for noisy performance. 36 # can compensate for noisy performance.
46 arguments.extend(['--repeat', str(BENCH_REPEAT_COUNT), '--logPerIter']) 37 arguments.extend(['--repeat', str(BENCH_REPEAT_COUNT), '--logPerIter'])
47 self._flavor_utils.RunFlavoredCmd('bench_pictures', arguments) 38 self._flavor_utils.RunFlavoredCmd('bench_pictures', arguments)
48 39
49 def _Run(self): 40 def _Run(self):
50 # Determine which configs to run 41 # Determine which configs to run
51 if self._configuration == 'Debug': 42 if self._configuration == 'Debug':
52 cfg_name = 'debug' 43 cfg_name = 'debug'
53 else: 44 else:
(...skipping 26 matching lines...) Expand all
80 self._DoBenchPictures(args) 71 self._DoBenchPictures(args)
81 except Exception as e: 72 except Exception as e:
82 print e 73 print e
83 errors.append(e) 74 errors.append(e)
84 if errors: 75 if errors:
85 raise errors[0] 76 raise errors[0]
86 77
87 78
88 if '__main__' == __name__: 79 if '__main__' == __name__:
89 sys.exit(BuildStep.RunBuildStep(BenchPictures)) 80 sys.exit(BuildStep.RunBuildStep(BenchPictures))
OLDNEW
« no previous file with comments | « no previous file | slave/skia_slave_scripts/run_bench.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698