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

Unified Diff: tools/perf/fetch_benchmark_deps.py

Issue 1568103002: Update tools/perf to use cloud_storage from catapult. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Erik comment Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
Index: tools/perf/fetch_benchmark_deps.py
diff --git a/tools/perf/fetch_benchmark_deps.py b/tools/perf/fetch_benchmark_deps.py
index ac6bd815abbe871c15b09bfd8f53dc81c2b8dea0..cb9feba7e8a07506292c2c48dc5276f4c65f226a 100755
--- a/tools/perf/fetch_benchmark_deps.py
+++ b/tools/perf/fetch_benchmark_deps.py
@@ -8,19 +8,13 @@
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'telemetry'))
+from core import path_util
+path_util.AddCatapultBaseToPath()
from catapult_base import cloud_storage
-from telemetry import benchmark_runner
-
-
-def _GetPerfDir(*subdirs):
- perf_dir = os.path.realpath(os.path.dirname(__file__))
- return os.path.join(perf_dir, *subdirs)
-
-def GetChromiumDir():
- return _GetPerfDir(os.path.pardir, os.path.pardir, os.path.pardir)
+path_util.AddTelemetryToPath()
+from telemetry import benchmark_runner
def _FetchDependenciesIfNeeded(story_set):
@@ -57,7 +51,7 @@ def _EnumerateDependencies(story_set):
deps.add(path_name)
# Return relative paths.
- prefix_len = len(os.path.realpath(GetChromiumDir())) + 1
+ prefix_len = len(os.path.realpath(path_util.GetChromiumSrcDir())) + 1
return [dep[prefix_len:] for dep in deps if dep]
@@ -68,8 +62,8 @@ def _show_usage():
def main(output=sys.stdout):
config = benchmark_runner.ProjectConfig(
- top_level_dir=_GetPerfDir(),
- benchmark_dirs=[_GetPerfDir('benchmarks')])
+ top_level_dir=path_util.GetPerfDir(),
+ benchmark_dirs=[path_util.GetPerfDir('benchmarks')])
eakuefner 2016/01/08 19:54:54 While you're at it, maybe you can consider adding
aiolos (Not reviewing) 2016/01/08 20:25:27 Done.
name = sys.argv[1]
benchmark = benchmark_runner.GetBenchmarkByName(name, config)

Powered by Google App Engine
This is Rietveld 408576698