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

Side by Side Diff: tracing/tracing/ui/side_panel/metrics_side_panel.html

Issue 3009553002: Refactor Histogram relationship diagnostics. (Closed)
Patch Set: Created 3 years, 3 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 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/raf.html"> 8 <link rel="import" href="/tracing/base/raf.html">
9 <link rel="import" href="/tracing/metrics/metric_map_function.html"> 9 <link rel="import" href="/tracing/metrics/metric_map_function.html">
10 <link rel="import" href="/tracing/metrics/metric_registry.html"> 10 <link rel="import" href="/tracing/metrics/metric_registry.html">
11 <link rel="import" href="/tracing/model/event_set.html"> 11 <link rel="import" href="/tracing/model/event_set.html">
12 <link rel="import" href="/tracing/mre/mre_result.html"> 12 <link rel="import" href="/tracing/mre/mre_result.html">
13 <link rel="import" href="/tracing/ui/base/dom_helpers.html"> 13 <link rel="import" href="/tracing/ui/base/dom_helpers.html">
14 <link rel="import" href="/tracing/ui/side_panel/side_panel.html"> 14 <link rel="import" href="/tracing/ui/side_panel/side_panel.html">
15 <link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html"> 15 <link rel="import" href="/tracing/ui/side_panel/side_panel_registry.html">
16 <link rel="import" href="/tracing/value/histogram_set.html"> 16 <link rel="import" href="/tracing/value/histogram_set.html">
17 <link rel="import" href="/tracing/value/ui/histogram_set_view.html"> 17 <link rel="import" href="/tracing/value/ui/histogram_set_view.html">
18 18
19 <dom-module id="tr-ui-sp-metrics-side-panel"> 19 <dom-module id="tr-ui-sp-metrics-side-panel">
20 <template> 20 <template>
21 <style> 21 <style>
22 :host { 22 :host {
23 display: flex; 23 display: flex;
24 flex-direction: column; 24 flex-direction: column;
25 } 25 }
26 div#error { 26 div#error {
27 color: red; 27 color: red;
28 white-space: pre;
28 } 29 }
29 #results { 30 #results {
30 font-size: 12px; 31 font-size: 12px;
31 } 32 }
32 </style> 33 </style>
33 34
34 <top-left-controls id="top_left_controls"></top-left-controls> 35 <top-left-controls id="top_left_controls"></top-left-controls>
35 36
36 <tr-v-ui-histogram-set-view id="results"></tr-v-ui-histogram-set-view> 37 <tr-v-ui-histogram-set-view id="results"></tr-v-ui-histogram-set-view>
37 38
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 this.rangeOfInterest && 194 this.rangeOfInterest &&
194 !this.rangeOfInterest.isEmpty) { 195 !this.rangeOfInterest.isEmpty) {
195 options.rangeOfInterest = this.rangeOfInterest; 196 options.rangeOfInterest = this.rangeOfInterest;
196 } 197 }
197 198
198 const startDate = new Date(); 199 const startDate = new Date();
199 let histograms; 200 let histograms;
200 try { 201 try {
201 histograms = tr.metrics.runMetrics(this.model_, options); 202 histograms = tr.metrics.runMetrics(this.model_, options);
202 } catch (err) { 203 } catch (err) {
203 Polymer.dom(this.$.error).textContent = err.message; 204 Polymer.dom(this.$.error).textContent = err.stack;
204 return; 205 return;
205 } 206 }
206 207
207 this.metricLatenciesMs_.push(new Date() - startDate); 208 this.metricLatenciesMs_.push(new Date() - startDate);
208 while (this.metricLatenciesMs_.length > 20) { 209 while (this.metricLatenciesMs_.length > 20) {
209 this.metricLatenciesMs_.shift(); 210 this.metricLatenciesMs_.shift();
210 } 211 }
211 212
212 this.recomputeButton_.style.background = ''; 213 this.recomputeButton_.style.background = '';
213 214
214 await this.$.results.build(histograms); 215 await this.$.results.build(histograms);
215 } 216 }
216 }); 217 });
217 218
218 tr.ui.side_panel.SidePanelRegistry.register(function() { 219 tr.ui.side_panel.SidePanelRegistry.register(function() {
219 return document.createElement('tr-ui-sp-metrics-side-panel'); 220 return document.createElement('tr-ui-sp-metrics-side-panel');
220 }); 221 });
221 222
222 return {}; 223 return {};
223 }); 224 });
224 </script> 225 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/v8/runtime_stats_metric.html ('k') | tracing/tracing/value/diagnostics/add_related_names.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698