Index: tools/perf/core/path_util.py |
diff --git a/tools/perf/core/path_util.py b/tools/perf/core/path_util.py |
index 77ea275fd1a67149ee806a5cbf7835816084cabd..1d50b304f218323abbacdddb658fa8ab95369a69 100644 |
--- a/tools/perf/core/path_util.py |
+++ b/tools/perf/core/path_util.py |
@@ -14,10 +14,17 @@ def GetChromiumSrcDir(): |
return chromium_config.GetChromiumSrcDir() |
+ |
+def GetCatapultBaseDir(): |
+ return os.path.join( |
+ GetChromiumSrcDir(), 'third_party', 'catapult', 'catapult_base') |
+ |
+ |
def GetTelemetryDir(): |
return chromium_config.GetTelemetryDir() |
+ |
def GetPerfDir(): |
return os.path.join(GetChromiumSrcDir(), 'tools', 'perf') |
@@ -28,3 +35,15 @@ def GetPerfStorySetsDir(): |
def GetPerfBenchmarksDir(): |
return os.path.join(GetPerfDir(), 'benchmarks') |
+ |
+ |
+def AddTelemetryToPath(): |
+ telemetry_path = GetTelemetryDir() |
+ if telemetry_path not in sys.path: |
+ sys.path.insert(1, telemetry_path) |
+ |
+ |
+def AddCatapultBaseToPath(): |
+ catapult_base_path = GetCatapultBaseDir() |
+ if catapult_base_path not in sys.path: |
+ sys.path.insert(1, catapult_base_path) |