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

Unified Diff: tools/perf/fetch_benchmark_deps.py

Issue 2921353002: Refactor how we fetch Telemetry deps conditionally (Closed)
Patch Set: Only fetch data of official perf benchmarks Created 3 years, 6 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/conditionally_execute ('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 0a07d061a5a86c84be67d036b1c77af20e64cc19..73749ce2176729372140bcb1fd7c064f297590a4 100755
--- a/tools/perf/fetch_benchmark_deps.py
+++ b/tools/perf/fetch_benchmark_deps.py
@@ -17,12 +17,17 @@ from py_utils import cloud_storage
path_util.AddTelemetryToPath()
from telemetry import benchmark_runner
+# TODO(nedn): we should not rely on Telemetry private API.
+from telemetry.internal.browser import browser_options
from chrome_telemetry_build import chromium_config
def _FetchDependenciesIfNeeded(story_set):
""" Download files needed by a user story set. """
+ if not story_set.wpr_archive_info:
+ return
+
# Download files in serving_dirs.
serving_dirs = story_set.serving_dirs
for directory in serving_dirs:
@@ -60,8 +65,12 @@ def _EnumerateDependencies(story_set):
def FetchDepsForBenchmark(benchmark, output):
+ parser = browser_options.BrowserFinderOptions().CreateParser()
+ benchmark.AddCommandLineArgs(parser)
+ options, _ = parser.parse_args([])
+
# Download files according to specified benchmark.
- story_set = benchmark().CreateStorySet(None)
+ story_set = benchmark().CreateStorySet(options)
_FetchDependenciesIfNeeded(story_set)
@@ -96,9 +105,9 @@ def main(args, output):
raw_input(
'No benchmark name is specified. Fetching all benchmark deps. '
'Press enter to continue...')
- for b in benchmark_finders.GetAllBenchmarks():
+ for b in benchmark_finders.GetAllPerfBenchmarks():
print >> output, ('Fetch dependencies for benchmark %s:'
- % benchmark.Name())
+ % b.Name())
jbudorick 2017/06/06 17:08:15 This fix should still land somewhere, whether in t
FetchDepsForBenchmark(b, output)
if __name__ == '__main__':
« no previous file with comments | « tools/perf/conditionally_execute ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698