Chromium Code Reviews| 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: |