Chromium Code Reviews| Index: tracing/tracing/metrics/metric_map_function.html |
| diff --git a/tracing/tracing/metrics/metric_map_function.html b/tracing/tracing/metrics/metric_map_function.html |
| index bbfa316d77123dc07383f927770830d7e8f8d003..549e0d6a46b3c718aa8efa21f0a79936f616c1ba 100644 |
| --- a/tracing/tracing/metrics/metric_map_function.html |
| +++ b/tracing/tracing/metrics/metric_map_function.html |
| @@ -23,16 +23,18 @@ tr.exportTo('tr.metrics', function() { |
| if (options === undefined) |
| throw new Error('Expected an options dict.'); |
| - var metricName = options.metric; |
| - if (metricName === undefined) |
| - throw new Error('A metric name should be specified.'); |
| + var metricNames = options.metrics; |
| + if (metricNames === undefined) |
|
charliea (OOO until 10-5)
2016/07/06 17:41:05
Maybe add a check for if metricNames.length === 0?
|
| + throw new Error('Metric names should be specified.'); |
| var values = new tr.v.ValueSet(); |
| - var metric = tr.metrics.MetricRegistry.findTypeInfoWithName(metricName); |
| - if (metric === undefined) |
| - throw new Error('"' + metricName + '" is not a registered metric.'); |
| - metric.constructor(values, model); |
| + for (var metricName of metricNames) { |
| + var metric = tr.metrics.MetricRegistry.findTypeInfoWithName(metricName); |
| + if (metric === undefined) |
| + throw new Error('"' + metricName + '" is not a registered metric.'); |
| + metric.constructor(values, model); |
| + } |
| for (var metadata of model.metadata) { |
| if (!metadata.value || !metadata.value['iteration-info']) |