Commit 305d2653 authored by Ryan Heise's avatar Ryan Heise Committed by Commit Bot

Add option for fetch_benchmark_deps to only fetch needed WPR archives.

Looking at the tryjobs for patchset 4 of this CL (which removes
all WPR archives and redownloads only the ones relevant to the platform
being run), and patchset 10 (which checks baseline, in the mac_chromium_compile_dbg_ng build)
we see the following:

Without change: 791.95s
Android: 104.41s
Win: 189.83s
Mac: 286.69s
Linux: 113s

Change-Id: I5c14eb69cc7f13997910e2759130cdcba9eef5ba
Bug: chromium:1056387
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2425303
Commit-Queue: Ryan Heise <heiserya@google.com>
Auto-Submit: Ryan Heise <heiserya@google.com>
Reviewed-by: default avatarJohn Chen <johnchen@chromium.org>
Reviewed-by: default avatarDirk Pranke <dpranke@google.com>
Cr-Commit-Position: refs/heads/master@{#810397}
parent 063275b4
......@@ -4628,17 +4628,53 @@ hooks = [
'src/third_party/catapult/telemetry/bin/fetch_telemetry_binary_dependencies',
],
},
#
# Download Telemetry's benchmark binary dependencies via conditionals
{
'name': 'checkout_telemetry_benchmark_deps',
'condition': 'checkout_telemetry_dependencies',
'condition': 'checkout_telemetry_dependencies and checkout_linux',
'pattern': '.',
'action': [ 'vpython',
'src/tools/perf/fetch_benchmark_deps.py',
'-f',
'-p',
'linux'
],
},
{
'name': 'checkout_telemetry_benchmark_deps',
'condition': 'checkout_telemetry_dependencies and checkout_win',
'pattern': '.',
'action': [ 'vpython',
'src/tools/perf/fetch_benchmark_deps.py',
'-f',
'-p',
'win'
],
},
{
'name': 'checkout_telemetry_benchmark_deps',
'condition': 'checkout_telemetry_dependencies and checkout_mac',
'pattern': '.',
'action': [ 'vpython',
'src/tools/perf/fetch_benchmark_deps.py',
'-f',
'-p',
'mac'
],
},
{
'name': 'checkout_telemetry_benchmark_deps',
'condition': 'checkout_telemetry_dependencies and checkout_android',
'pattern': '.',
'action': [ 'vpython',
'src/tools/perf/fetch_benchmark_deps.py',
'-f',
'-p',
'android'
],
},
# This is used to ensure that all network operations are properly
# annotated so we can document what they're for.
......
......@@ -17,7 +17,6 @@ from core import benchmark_finders
from core import path_util
from py_utils import cloud_storage
def _FetchDependenciesIfNeeded(story_set):
""" Download files needed by a user story set. """
# Download files in serving_dirs.
......@@ -86,6 +85,10 @@ def main(args):
help=('Force fetching all the benchmarks when '
'benchmark_name is not specified'),
action='store_true', default=False)
parser.add_argument('--platform', '-p',
help=('Only fetch benchmarks for the specified platform '
'(win, linux, mac, android)'),
default=None)
# Flag --output-deps: output the dependencies to a json file, CrOS autotest
# telemetry_runner parses the output to upload the dependencies to the DUT.
# Example output, fetch_benchmark_deps.py --output-deps=deps octane:
......@@ -122,7 +125,11 @@ def main(args):
'No benchmark name is specified. Fetching all benchmark deps. '
'Press enter to continue...')
for b in benchmark_finders.GetOfficialBenchmarks():
deps[b.Name()] = _FetchDepsForBenchmark(b)
supported_platforms = b.GetSupportedPlatformNames(b.SUPPORTED_PLATFORMS)
if(not options.platform or
options.platform in supported_platforms or
'all' in supported_platforms):
deps[b.Name()] = _FetchDepsForBenchmark(b)
if options.output_deps:
with open(options.output_deps, 'w') as outfile:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment