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

Side by Side Diff: tools/perf/record_wpr

Issue 2824053002: [tools/perf] Remove default values of benchmark_dirs and top_level_dir in chromium_config module (R… (Closed)
Patch Set: Fix referencess Created 3 years, 8 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/perf/record_android_profile.py ('k') | tools/perf/run_benchmark » ('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 2012 The Chromium Authors. All rights reserved. 2 # Copyright 2012 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 import os 5 import os
6 import sys 6 import sys
7 7
8 8
9 from chrome_telemetry_build import chromium_config 9 from chrome_telemetry_build import chromium_config
10 sys.path.append(chromium_config.GetTelemetryDir()) 10 from core import path_util
11 path_util.AddTelemetryToPath()
11 12
12 from telemetry import record_wpr 13 from telemetry import record_wpr
13 14
14 # This is required to resolve importing davclient in tools/perf/third_party/ 15 # This is required to resolve importing davclient in tools/perf/third_party/
15 # when record_wpr try to dynamically discover benchmark classes. 16 # when record_wpr try to dynamically discover benchmark classes.
16 import third_party # pylint: disable=unused-import 17 import third_party # pylint: disable=unused-import
17 18
18 19
19 _WARNING_PATTERN = '\033[93m%s\033[0m' # Use yellow color for warning. 20 _WARNING_PATTERN = '\033[93m%s\033[0m' # Use yellow color for warning.
20 21
21 22
22 def _WarnPythonVersion(): 23 def _WarnPythonVersion():
23 print (_WARNING_PATTERN % 24 print (_WARNING_PATTERN %
24 ("Your system python's version is less than 2.7.9. " 25 ("Your system python's version is less than 2.7.9. "
25 'For best recording results, please run record_wpr with Python ' 26 'For best recording results, please run record_wpr with Python '
26 'version 2.7.9 or after (See ' 27 'version 2.7.9 or after (See '
27 'https://github.com/chromium/web-page-replay/issues/73 ' 28 'https://github.com/chromium/web-page-replay/issues/73 '
28 'for more information).\n' 29 'for more information).\n'
29 'For instructions on how to upgrade Python on Ubuntu 14.04, see:\n' 30 'For instructions on how to upgrade Python on Ubuntu 14.04, see:\n'
30 'http://mbless.de/blog/2016/01/09/upgrade-to-python-2711-on-ubuntu-140 4-lts.html')) 31 'http://mbless.de/blog/2016/01/09/upgrade-to-python-2711-on-ubuntu-140 4-lts.html'))
31 32
32 33
33 if __name__ == '__main__': 34 if __name__ == '__main__':
34 if sys.version_info < (2, 7, 9): 35 if sys.version_info < (2, 7, 9):
35 _WarnPythonVersion() 36 _WarnPythonVersion()
36 sys.exit(record_wpr.Main(environment=chromium_config.ChromiumConfig())) 37 config = chromium_config.ChromiumConfig(
38 benchmark_dirs=[path_util.GetPerfBenchmarksDir()],
39 top_level_dir=path_util.GetPerfDir())
40 sys.exit(record_wpr.Main(environment=config))
OLDNEW
« no previous file with comments | « tools/perf/record_android_profile.py ('k') | tools/perf/run_benchmark » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698