| 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 9e152670e8514ba1a4697dc5c4ee14ac488c5e63..9d517138d6f76e25ccfd3040a08e2bb26568177d 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)
|
| + 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'])
|
| @@ -41,9 +43,7 @@ tr.exportTo('tr.metrics', function() {
|
| metadata.value['iteration-info']);
|
| // Values can be separated from their ValueSet and mixed into ValueSets
|
| // with Values from other iterations, so add IterationInfo to each Value.
|
| - values.map(function(value) {
|
| - value.diagnostics.add('iteration', iteration);
|
| - });
|
| + values.map(v => iteration.addToValue(v));
|
| }
|
|
|
| result.addPair('values', values.valueDicts);
|
|
|