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 a4f10972021338995dade1d19d7067bd850cbee3..0095c5c43fd2548e50990db44ab09e2a509e638a 100644 |
--- a/tracing/tracing/metrics/metric_map_function.html |
+++ b/tracing/tracing/metrics/metric_map_function.html |
@@ -21,19 +21,22 @@ tr.exportTo('tr.metrics', function() { |
* @return {!tr.v.HistogramSet} |
*/ |
function runMetrics(model, options) { |
- if (options === undefined) |
+ if (options === undefined) { |
throw new Error('Options are required.'); |
+ } |
var metricNames = options.metrics; |
- if (!metricNames) |
+ if (!metricNames) { |
throw new Error('Metric names should be specified.'); |
+ } |
var histograms = new tr.v.HistogramSet(); |
for (var metricName of metricNames) { |
var metric = tr.metrics.MetricRegistry.findTypeInfoWithName(metricName); |
- if (metric === undefined) |
+ if (metric === undefined) { |
throw new Error('"' + metricName + '" is not a registered metric.'); |
+ } |
metric.constructor(histograms, model, options); |
} |