Commit 21d1cd56 authored by Madeleine Barowsky's avatar Madeleine Barowsky Committed by Commit Bot

[Telemetry] Include contrib benchmarks in list_benchmarks utility

Contrib benchmarks are those that are not supported on the Chrome perf
waterfall but can be manually run by users. This change includes them
in the results of list_benchmarks if the --include-contrib option is
supplied.

Change-Id: Ie09c16888e3bb276dd1f2a9dfe421cf2fbd0e7aa
Reviewed-on: https://chromium-review.googlesource.com/c/1491854Reviewed-by: default avatarCaleb Rouleau <crouleau@chromium.org>
Commit-Queue: Caleb Rouleau <crouleau@chromium.org>
Auto-Submit: Madeleine Barowsky <mbarowsky@chromium.org>
Cr-Commit-Position: refs/heads/master@{#636255}
parent b5d35ac7
......@@ -2,6 +2,7 @@
# Copyright 2017 The Chromium Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
import optparse
import sys
from core import path_util
......@@ -11,13 +12,27 @@ sys.path.insert(1, path_util.GetTelemetryDir())
from telemetry import decorators
def _CreateParser():
parser = optparse.OptionParser()
parser.add_option('--include-contrib', action='store_true', default=False,
help="also list contrib (non-waterfall) benchmarks")
return parser
def main():
all_benchmarks = benchmark_finders.GetAllPerfBenchmarks()
for b in all_benchmarks:
disabled_platforms = ', '.join(decorators.GetDisabledAttributes(b))
print '{:<60} {:<40}'.format(b.Name(), disabled_platforms)
def main(args):
parser = _CreateParser()
options, extra_args = parser.parse_args(args)
if extra_args:
parser.error('Unexpected command line arguments')
if options.include_contrib:
benchmarks = benchmark_finders.GetAllBenchmarks()
else:
benchmarks = benchmark_finders.GetAllPerfBenchmarks()
for b in benchmarks:
print '{:<60}'.format(b.Name())
if __name__ == '__main__':
sys.exit(main())
sys.exit(main(sys.argv[1:]))
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