Commit 99230241 authored by Emily Hanley's avatar Emily Hanley Committed by Commit Bot

Adding ability to generate sharding maps for a subset of benchmarks

Bug: 840427
Change-Id: I1f11ed443c31afe50607cde766df13e610a07762
Reviewed-on: https://chromium-review.googlesource.com/1104793
Commit-Queue: Emily Hanley <eyaich@chromium.org>
Reviewed-by: default avatarNed Nguyen <nednguyen@google.com>
Cr-Commit-Position: refs/heads/master@{#570787}
parent 1a646775
......@@ -139,6 +139,10 @@ def get_parser():
parser.add_argument(
'--debug', action='store',
help='If specified, the filename to write extra timing data to.')
parser.add_argument(
'--benchmarks',
help='Comma separated list of benchmark names to generate a map for',
required=False)
return parser
......
......@@ -40,6 +40,11 @@ def _get_stories_for_benchmark(b):
return story_list
def _include_benchmark(name, shorlist):
if not shortlist:
return True
return name in shortlist
if __name__ == '__main__':
parser = sharding_map_generator.get_parser()
......@@ -49,8 +54,14 @@ if __name__ == '__main__':
# sharding_map_generator.py and perf_data_generator.py
benchmarks = perf_data_generator.current_benchmarks()
shortlist = []
if options.benchmarks:
shortlist = options.benchmarks.split(',')
benchmarks_data = {}
for b in benchmarks:
if not _include_benchmark(b.Name(), shortlist):
continue
benchmarks_data[b.Name()] = {
'repeat': b().options.get('pageset_repeat', 1),
'stories': _get_stories_for_benchmark(b)
......
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