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/perf/core/path_util.py

Issue 2823063003: Revert of [tools/perf] Remove default values of benchmark_dirs and top_level_dir in chromium_config module (Closed)
Patch Set: 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
OLDNEW
1 # Copyright 2015 The Chromium Authors. All rights reserved. 1 # Copyright 2015 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 import os 5 import os
6 import sys 6 import sys
7 7
8 sys.path.insert(1, os.path.join(os.path.abspath(__file__), '..', '..'))
9
10 from chrome_telemetry_build import chromium_config
11
8 12
9 def GetChromiumSrcDir(): 13 def GetChromiumSrcDir():
10 return os.path.abspath(os.path.join( 14 return chromium_config.GetChromiumSrcDir()
11 os.path.dirname(__file__), '..', '..', '..')) 15
12 16
13 17
14 def GetTelemetryDir(): 18 def GetTelemetryDir():
15 return os.path.join( 19 return chromium_config.GetTelemetryDir()
16 GetChromiumSrcDir(), 'third_party', 'catapult', 'telemetry')
17 20
18 21
19 def GetPerfDir(): 22 def GetPerfDir():
20 return os.path.join(GetChromiumSrcDir(), 'tools', 'perf') 23 return os.path.join(GetChromiumSrcDir(), 'tools', 'perf')
21 24
22 25
23 def GetPerfStorySetsDir(): 26 def GetPerfStorySetsDir():
24 return os.path.join(GetPerfDir(), 'page_sets') 27 return os.path.join(GetPerfDir(), 'page_sets')
25 28
26 29
27 def GetPerfBenchmarksDir(): 30 def GetPerfBenchmarksDir():
28 return os.path.join(GetPerfDir(), 'benchmarks') 31 return os.path.join(GetPerfDir(), 'benchmarks')
29 32
30 33
31 def AddTelemetryToPath(): 34 def AddTelemetryToPath():
32 telemetry_path = GetTelemetryDir() 35 telemetry_path = GetTelemetryDir()
33 if telemetry_path not in sys.path: 36 if telemetry_path not in sys.path:
34 sys.path.insert(1, telemetry_path) 37 sys.path.insert(1, telemetry_path)
35 38
36 39
37 def AddPyUtilsToPath(): 40 def AddPyUtilsToPath():
38 py_utils_dir = os.path.join( 41 py_utils_dir = os.path.join(
39 GetChromiumSrcDir(), 'third_party', 'catapult', 'common', 'py_utils') 42 GetChromiumSrcDir(), 'third_party', 'catapult', 'common', 'py_utils')
40 if py_utils_dir not in sys.path: 43 if py_utils_dir not in sys.path:
41 sys.path.insert(1, py_utils_dir) 44 sys.path.insert(1, py_utils_dir)
OLDNEW
« no previous file with comments | « tools/perf/chrome_telemetry_build/chromium_config.py ('k') | tools/perf/core/perf_data_generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698