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

Side by Side Diff: tracing/tracing/metrics/value_set.html

Issue 2061853002: Fix a few side panel bugs (Closed) Base URL: https://github.com/catapult-project/catapult.git@master
Patch Set: set overflow-y:auto on side-panel-container 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 unified diff | Download patch
« no previous file with comments | « no previous file | tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright 2016 The Chromium Authors. All rights reserved. 3 Copyright 2016 The Chromium Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style license that can be 4 Use of this source code is governed by a BSD-style license that can be
5 found in the LICENSE file. 5 found in the LICENSE file.
6 --> 6 -->
7 7
8 <link rel="import" href="/tracing/base/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/value/numeric.html"> 9 <link rel="import" href="/tracing/value/numeric.html">
10 <link rel="import" href="/tracing/value/unit.html"> 10 <link rel="import" href="/tracing/value/unit.html">
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 }, this); 64 }, this);
65 }, 65 },
66 66
67 getValuesWithName: function(name) { 67 getValuesWithName: function(name) {
68 return tr.b.dictionaryValues(this.values_).filter(function(value) { 68 return tr.b.dictionaryValues(this.values_).filter(function(value) {
69 return value.name.indexOf(name) > -1; 69 return value.name.indexOf(name) > -1;
70 }); 70 });
71 }, 71 },
72 72
73 addValue: function(v) { 73 addValue: function(v) {
74 if (!(v instanceof tr.v.NumericValue)) {
75 var err = new Error('Tried to add value ' + v +
76 ' which is non-Numeric');
77 err.name = 'ValueError';
78 throw err;
79 }
80
81 if (this.values_[v.guid]) { 74 if (this.values_[v.guid]) {
82 var err = new Error('Tried to add same value twice'); 75 var err = new Error('Tried to add same value twice');
83 err.name = 'ValueError'; 76 err.name = 'ValueError';
84 throw err; 77 throw err;
85 } 78 }
86 79
87 this.values_[v.guid] = v; 80 this.values_[v.guid] = v;
88 81
89 if (v.numeric instanceof tr.v.Numeric) { 82 if (v.numeric instanceof tr.v.Numeric) {
90 ValueSet.computeSummaryValuesForNumericValue(v).forEach(function(s) { 83 ValueSet.computeSummaryValuesForNumericValue(v).forEach(function(s) {
(...skipping 13 matching lines...) Expand all
104 value.name + '_' + stat.name, stat.scalar, 97 value.name + '_' + stat.name, stat.scalar,
105 { description: value.description }); 98 { description: value.description });
106 }); 99 });
107 }; 100 };
108 101
109 return { 102 return {
110 ValueSet: ValueSet 103 ValueSet: ValueSet
111 }; 104 };
112 }); 105 });
113 </script> 106 </script>
OLDNEW
« no previous file with comments | « no previous file | tracing/tracing/ui/extras/side_panel/input_latency_side_panel.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698