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

Unified Diff: tools/perf/fetch_benchmark_deps.py

Issue 1383773002: [Telemetry] Update tools/perf/fetch_benchmark_deps.py to use client_config (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Kari's 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
« no previous file with comments | « tools/perf/core/path_util.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..a2c6a8c284600a6a55ec57e961fa39c0d71b7742 100755
--- a/tools/perf/fetch_benchmark_deps.py
+++ b/tools/perf/fetch_benchmark_deps.py
@@ -8,21 +8,14 @@
import os
import sys
-sys.path.append(os.path.join(os.path.dirname(__file__), '..', 'telemetry'))
+from core import path_util
+
+sys.path.insert(1, path_util.GetTelemetryDir())
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)
-
-
def _FetchDependenciesIfNeeded(story_set):
""" Download files needed by a user story set. """
# Download files in serving_dirs.
@@ -57,7 +50,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 +61,9 @@ 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.GetPerfBenchmarksDir()],
+ client_config=path_util.GetPerfClientConfigPath())
name = sys.argv[1]
benchmark = benchmark_runner.GetBenchmarkByName(name, config)
« no previous file with comments | « tools/perf/core/path_util.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698