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

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

Issue 2110683010: Allow benchmarks to specify running multiple metrics. (Closed) Base URL: git@github.com:catapult-project/catapult@master
Patch Set: code review changes 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/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..0f8f288582a41daccee06a12a51084c8b744f7f3 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)
+ var metricNames = options.metrics;
+ if (metricNames === undefined)
throw new Error('A metric name should be specified.');
petrcermak 2016/07/06 08:19:47 nit: s/A metric name/Metric names/
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'])

Powered by Google App Engine
This is Rietveld 408576698