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

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: fix style some more 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 bbfa316d77123dc07383f927770830d7e8f8d003..3e7589be35cc037de3e24efbc09330dbc9e3d5da 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'])
« 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