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

Unified Diff: tracing/tracing/ui/side_panel/metrics_side_panel.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 | « tracing/tracing/metrics/system_health/responsiveness_metric.html ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tracing/tracing/ui/side_panel/metrics_side_panel.html
diff --git a/tracing/tracing/ui/side_panel/metrics_side_panel.html b/tracing/tracing/ui/side_panel/metrics_side_panel.html
index 18c40d3595e6596840148f32986d677e05b0baa2..620431cbbc6ba7bc6e0e81be0bbeacdcf842d84d 100644
--- a/tracing/tracing/ui/side_panel/metrics_side_panel.html
+++ b/tracing/tracing/ui/side_panel/metrics_side_panel.html
@@ -38,6 +38,8 @@ tr.exportTo('tr.ui', function() {
ready: function() {
this.model_ = undefined;
+ this.rangeOfInterest_ = undefined;
+
this.metrics_ = [];
tr.metrics.MetricRegistry.getAllRegisteredTypeInfos().forEach(
function(m) {
@@ -91,12 +93,23 @@ tr.exportTo('tr.ui', function() {
// Not applicable to metrics.
},
- set selection(selection) {
+ set selection(_) {
// Not applicable to metrics.
},
- set rangeOfInterest(_) {
- // Not applicable to metrics.
+ /**
+ * @return {undefined|!tr.b.Range}
+ */
+ get rangeOfInterest() {
+ return this.rangeOfInterest_;
+ },
+
+ /**
+ * @param {!tr.b.Range} range
+ */
+ set rangeOfInterest(range) {
+ this.rangeOfInterest_ = range;
+ this.updateContents_();
},
updateContents_: function() {
@@ -115,7 +128,9 @@ tr.exportTo('tr.ui', function() {
this.currentMetricName_);
var values = new tr.metrics.ValueSet();
try {
- metric.constructor(values, this.model_);
+ metric.constructor(values, this.model_, {
+ rangeOfInterest: this.rangeOfInterest
+ });
} catch (err) {
this.$.results.error = err;
return;
« no previous file with comments | « tracing/tracing/metrics/system_health/responsiveness_metric.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698