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

Side by Side Diff: tracing/tracing/value/diagnostics/diagnostic_map.html

Issue 2998043002: Remove RelatedHistogramSet. (Closed)
Patch Set: Created 3 years, 4 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 <!-- 8 <!--
9 Include all Diagnostic subclasses here so that DiagnosticMap.addDicts() and 9 Include all Diagnostic subclasses here so that DiagnosticMap.addDicts() and
10 DiagnosticMap.fromDict() always have access to all subclasses in the 10 DiagnosticMap.fromDict() always have access to all subclasses in the
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 /** 168 /**
169 * RelatedHistogram diagnostics cannot be merged when Histograms are merged 169 * RelatedHistogram diagnostics cannot be merged when Histograms are merged
170 * because the related Histograms might not exist yet. 170 * because the related Histograms might not exist yet.
171 * This method assumes that all related Histograms exist and that duplicate 171 * This method assumes that all related Histograms exist and that duplicate
172 * Diagnostics have been deduplicated. 172 * Diagnostics have been deduplicated.
173 * 173 *
174 * @param {!tr.v.Histogram} parentHist 174 * @param {!tr.v.Histogram} parentHist
175 */ 175 */
176 mergeRelationships(parentHist) { 176 mergeRelationships(parentHist) {
177 for (const [name, diagnostic] of this) { 177 for (const [name, diagnostic] of this) {
178 if (!(diagnostic instanceof tr.v.d.RelatedHistogramSet) && 178 if (!(diagnostic instanceof tr.v.d.RelatedHistogramMap) &&
179 !(diagnostic instanceof tr.v.d.RelatedHistogramMap) &&
180 !(diagnostic instanceof tr.v.d.RelatedHistogramBreakdown) && 179 !(diagnostic instanceof tr.v.d.RelatedHistogramBreakdown) &&
181 !(diagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) { 180 !(diagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) {
182 continue; 181 continue;
183 } 182 }
184 183
185 for (const otherHist of this.get(tr.v.d.RESERVED_NAMES.MERGED_FROM)) { 184 for (const [unusedName, otherHist] of
185 this.get(tr.v.d.RESERVED_NAMES.MERGED_FROM)) {
186 const otherDiagnostic = otherHist.diagnostics.get(name); 186 const otherDiagnostic = otherHist.diagnostics.get(name);
187 if (!(otherDiagnostic instanceof tr.v.d.RelatedHistogramSet) && 187 if (!(otherDiagnostic instanceof tr.v.d.RelatedHistogramMap) &&
188 !(otherDiagnostic instanceof tr.v.d.RelatedHistogramMap) &&
189 !(otherDiagnostic instanceof tr.v.d.RelatedHistogramBreakdown) && 188 !(otherDiagnostic instanceof tr.v.d.RelatedHistogramBreakdown) &&
190 !(otherDiagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) { 189 !(otherDiagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) {
191 continue; 190 continue;
192 } 191 }
193 diagnostic.mergeRelationships(otherDiagnostic, parentHist, otherHist); 192 diagnostic.mergeRelationships(otherDiagnostic, parentHist, otherHist);
194 } 193 }
195 } 194 }
196 } 195 }
197 } 196 }
198 197
199 return { 198 return {
200 DiagnosticMap, 199 DiagnosticMap,
201 }; 200 };
202 }); 201 });
203 </script> 202 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/value/diagnostics/all_diagnostics.html ('k') | tracing/tracing/value/diagnostics/diagnostic_map_test.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698