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

Side by Side Diff: tracing/tracing/ui/analysis/multi_event_sub_view.html

Issue 2776653002: [ESLint] Fix violations when enabling curly rule in eslint. (Closed)
Patch Set: Fix test Created 3 years, 9 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
OLDNEW
1 <!DOCTYPE html> 1 <!DOCTYPE html>
2 <!-- 2 <!--
3 Copyright (c) 2013 The Chromium Authors. All rights reserved. 3 Copyright (c) 2013 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/base.html"> 8 <link rel="import" href="/tracing/base/base.html">
9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html"> 9 <link rel="import" href="/tracing/ui/analysis/analysis_sub_view.html">
10 <link rel="import" href="/tracing/ui/analysis/multi_event_summary_table.html"> 10 <link rel="import" href="/tracing/ui/analysis/multi_event_summary_table.html">
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 {key: 'cpuDuration', label: 'CPU Duration'}, 73 {key: 'cpuDuration', label: 'CPU Duration'},
74 {key: 'duration', label: 'Duration'}, 74 {key: 'duration', label: 'Duration'},
75 {key: 'cpuSelfTime', label: 'CPU Self Time'}, 75 {key: 'cpuSelfTime', label: 'CPU Self Time'},
76 {key: 'selfTime', label: 'Self Time'} 76 {key: 'selfTime', label: 'Self Time'}
77 ]; 77 ];
78 78
79 function buildDiagnostics_(slice) { 79 function buildDiagnostics_(slice) {
80 var diagnostics = {}; 80 var diagnostics = {};
81 for (var item of EVENT_FIELD) { 81 for (var item of EVENT_FIELD) {
82 var fieldName = item.key; 82 var fieldName = item.key;
83 if (slice[fieldName] === undefined) 83 if (slice[fieldName] === undefined) continue;
84 continue;
85 diagnostics[fieldName] = new tr.v.d.Scalar(new tr.b.Scalar( 84 diagnostics[fieldName] = new tr.v.d.Scalar(new tr.b.Scalar(
86 tr.b.Unit.byName.timeDurationInMs, slice[fieldName])); 85 tr.b.Unit.byName.timeDurationInMs, slice[fieldName]));
87 } 86 }
88 diagnostics['args'] = new tr.v.d.Generic(slice.args); 87 diagnostics['args'] = new tr.v.d.Generic(slice.args);
89 diagnostics['event'] = new tr.v.d.RelatedEventSet(slice); 88 diagnostics['event'] = new tr.v.d.RelatedEventSet(slice);
90 return diagnostics; 89 return diagnostics;
91 } 90 }
92 91
93 Polymer({ 92 Polymer({
94 is: 'tr-ui-a-multi-event-sub-view', 93 is: 'tr-ui-a-multi-event-sub-view',
(...skipping 16 matching lines...) Expand all
111 this.$.histogramSpan.graphWidth = 400; 110 this.$.histogramSpan.graphWidth = 400;
112 this.$.histogramSpan.canMergeSampleDiagnostics = false; 111 this.$.histogramSpan.canMergeSampleDiagnostics = false;
113 this.$.histogramContainer.style.display = 'none'; 112 this.$.histogramContainer.style.display = 'none';
114 }, 113 },
115 114
116 attached() { 115 attached() {
117 if (this.currentSelection_ !== undefined) this.updateContents_(); 116 if (this.currentSelection_ !== undefined) this.updateContents_();
118 }, 117 },
119 118
120 set selection(selection) { 119 set selection(selection) {
121 if (selection.length <= 1) 120 if (selection.length <= 1) {
122 throw new Error('Only supports multiple items'); 121 throw new Error('Only supports multiple items');
122 }
123 this.setSelectionWithoutErrorChecks(selection); 123 this.setSelectionWithoutErrorChecks(selection);
124 }, 124 },
125 125
126 get selection() { 126 get selection() {
127 return this.currentSelection_; 127 return this.currentSelection_;
128 }, 128 },
129 129
130 setSelectionWithoutErrorChecks(selection) { 130 setSelectionWithoutErrorChecks(selection) {
131 this.currentSelection_ = selection; 131 this.currentSelection_ = selection;
132 if (this.isAttached) this.updateContents_(); 132 if (this.isAttached) this.updateContents_();
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
202 } else { 202 } else {
203 this.$.radioPicker.style.display = 'none'; 203 this.$.radioPicker.style.display = 'none';
204 this.$.histogramContainer.style.display = 'none'; 204 this.$.histogramContainer.style.display = 'none';
205 } 205 }
206 } 206 }
207 }); 207 });
208 208
209 return {}; 209 return {};
210 }); 210 });
211 </script> 211 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698