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

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

Issue 2052593005: Pass rangeOfInterest to metrics for the metrics side panel (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: 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
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/long_tasks_metric.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/metrics/metric_registry.html
diff --git a/tracing/tracing/metrics/metric_registry.html b/tracing/tracing/metrics/metric_registry.html
index 2906d5c8ee13ba624bf3928f7767217c5ff47c5d..d0f52ef71fca99040d457c4e7f9c726cd2bb3bfd 100644
--- a/tracing/tracing/metrics/metric_registry.html
+++ b/tracing/tracing/metrics/metric_registry.html
@@ -24,8 +24,10 @@ tr.exportTo('tr.metrics', function() {
if (!(metric instanceof Function))
throw new Error('Metrics must be functions');
- if (metric.length !== 2)
- throw new Error('Metrics take a ValueSet and a Model');
+ if (metric.length < 2) {
+ throw new Error('Metrics take a ValueSet and a Model and ' +
+ 'optionally an options dictionary');
+ }
});
return {
« no previous file with comments | « no previous file | tracing/tracing/metrics/system_health/long_tasks_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698