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

Side by Side Diff: dashboard/dashboard/static/group_alerts.html

Issue 2993773002: Dashboard charts: display sparklines of related timeseries in a tab strip. (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 2017 The Chromium Authors. All rights reserved. 3 Copyright 2017 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="/dashboard/static/memory_related_names.html"> 8 <link rel="import" href="/dashboard/static/memory_related_names.html">
9 <link rel="import" href="/tracing/base/base.html"> 9 <link rel="import" href="/tracing/base/base.html">
10 10
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 * Groups Alerts such that all alerts in each group have overlapping revision 62 * Groups Alerts such that all alerts in each group have overlapping revision
63 * ranges and the same test suite. 63 * ranges and the same test suite.
64 * 64 *
65 * @param {!Array.<!Alert>} alerts 65 * @param {!Array.<!Alert>} alerts
66 * @return {!Array.<!Array.<!Alert>>} 66 * @return {!Array.<!Array.<!Alert>>}
67 */ 67 */
68 function groupAlerts(alerts) { 68 function groupAlerts(alerts) {
69 const groups = []; 69 const groups = [];
70 for (const alert of alerts) { 70 for (const alert of alerts) {
71 alert.measurementName = alert.test.split('/')[0]; 71 alert.measurementName = alert.test.split('/')[0];
72 alert.relatedNames = d.MEMORY_RELATED_NAMES.get(alert.measurementName); 72 if (d.MEMORY_PROCESS_RELATED_NAMES.has(alert.measurementName)) {
73 alert.relatedNames = d.MEMORY_PROCESS_RELATED_NAMES.get(
74 alert.measurementName);
75 }
76 if (d.MEMORY_COMPONENT_RELATED_NAMES.has(alert.measurementName)) {
77 alert.relatedNames = new Set(alert.relatedNames);
78 for (const name of d.MEMORY_COMPONENT_RELATED_NAMES.get(
79 alert.measurementName)) {
80 alert.relatedNames.add(name);
81 }
82 }
73 83
74 let merged = false; 84 let merged = false;
75 for (const group of groups) { 85 for (const group of groups) {
76 let doMerge = true; 86 let doMerge = true;
77 for (const other of group) { 87 for (const other of group) {
78 const should = shouldMerge(alert, other); 88 const should = shouldMerge(alert, other);
79 if (!should) { 89 if (!should) {
80 doMerge = false; 90 doMerge = false;
81 break; 91 break;
82 } 92 }
(...skipping 12 matching lines...) Expand all
95 return groups; 105 return groups;
96 } 106 }
97 107
98 return { 108 return {
99 groupAlerts, 109 groupAlerts,
100 shouldMerge, 110 shouldMerge,
101 isRelated, 111 isRelated,
102 }; 112 };
103 }); 113 });
104 </script> 114 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698