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

Unified Diff: tracing/bin/run_metric

Issue 2110683010: Allow benchmarks to specify running multiple metrics. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: Created 4 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
Index: tracing/bin/run_metric
diff --git a/tracing/bin/run_metric b/tracing/bin/run_metric
index 91a0eb35fb8cc0bdf1c94b0b24e8072a611e3504..3f7b4d3ed5b29ec0fbc7eddfa87444844665008f 100755
--- a/tracing/bin/run_metric
+++ b/tracing/bin/run_metric
@@ -17,16 +17,17 @@ def Main(argv):
['/tracing/metrics/all_metrics.html'])
parser = argparse.ArgumentParser(
description='Runs metrics on local traces')
- parser.add_argument('metric_name',
- help=('The function name of a registered metric, NOT '
- 'filename. Available metrics are: %s' %
+ parser.add_argument('metric_names',
eakuefner 2016/06/30 18:45:03 Instead of doing this, can you make it possible to
alexandermont 2016/07/01 21:46:00 Done
eakuefner 2016/07/06 15:52:54 It doesn't look like this is done in the latest pa
eakuefner 2016/07/06 17:23:32 Talked to Alex about this offline and read a bit m
+ help=('Comma separated list of function names '
+ 'of registered metrics (not filenames.) '
+ 'Available metrics are: %s' %
', '.join(all_metrics)),
choices=all_metrics, metavar='metricName')
parser.add_argument('trace_file_or_dir',
help='A trace file, or a dir containing trace files')
args = parser.parse_args(argv[1:])
- metric = args.metric_name
+ metrics = args.metric_names.split(',')
if os.path.isdir(args.trace_file_or_dir):
trace_dir = args.trace_file_or_dir
@@ -35,7 +36,7 @@ def Main(argv):
traces = [args.trace_file_or_dir]
results = {k: v.AsDict()
- for k, v in metric_runner.RunMetricOnTraces(traces, metric).iteritems()}
+ for k, v in metric_runner.RunMetricOnTraces(traces, metrics).iteritems()}
failures = []
for trace in traces:

Powered by Google App Engine
This is Rietveld 408576698