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

Unified Diff: tracing/tracing/metrics/metric_map_function.html

Issue 2162963002: [polymer] Merge of master into polymer10-migration (Closed) Base URL: git@github.com:catapult-project/catapult.git@polymer10-migration
Patch Set: Merge polymer10-migration int polymer10-merge Created 4 years, 5 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
« no previous file with comments | « tracing/tracing/metrics/discover_unittest.py ('k') | tracing/tracing/metrics/metric_map_function_test.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « tracing/tracing/metrics/discover_unittest.py ('k') | tracing/tracing/metrics/metric_map_function_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698