Index: tracing/tracing/value/diagnostics/diagnostic_map.html |
diff --git a/tracing/tracing/value/diagnostics/diagnostic_map.html b/tracing/tracing/value/diagnostics/diagnostic_map.html |
index 950d0e31dff9df5bceb5da0a25af83057e856248..4c69a2e858299762dd295ccd32f057b4853d5343 100644 |
--- a/tracing/tracing/value/diagnostics/diagnostic_map.html |
+++ b/tracing/tracing/value/diagnostics/diagnostic_map.html |
@@ -113,7 +113,8 @@ tr.exportTo('tr.v.d', function() { |
static fromObject(obj) { |
const diagnostics = new DiagnosticMap(); |
- for (const [name, diagnostic] of Object.entries(obj)) { |
+ if (!(obj instanceof Map)) obj = Object.entries(obj); |
+ for (const [name, diagnostic] of obj) { |
diagnostics.set(name, diagnostic); |
} |
return diagnostics; |
@@ -121,9 +122,7 @@ tr.exportTo('tr.v.d', function() { |
addDiagnostics(other) { |
for (const [name, otherDiagnostic] of other) { |
- if (name === tr.v.d.RESERVED_NAMES.MERGED_FROM || |
- name === tr.v.d.RESERVED_NAMES.MERGED_TO || |
- name === tr.v.d.RESERVED_NAMES.GROUPING_PATH) { |
+ if (name === tr.v.d.RESERVED_NAMES.GROUPING_PATH) { |
continue; |
} |
@@ -164,35 +163,6 @@ tr.exportTo('tr.v.d', function() { |
[myDiagnostic, clone])); |
} |
} |
- |
- /** |
- * RelatedHistogram diagnostics cannot be merged when Histograms are merged |
- * because the related Histograms might not exist yet. |
- * This method assumes that all related Histograms exist and that duplicate |
- * Diagnostics have been deduplicated. |
- * |
- * @param {!tr.v.Histogram} parentHist |
- */ |
- mergeRelationships(parentHist) { |
- for (const [name, diagnostic] of this) { |
- if (!(diagnostic instanceof tr.v.d.RelatedHistogramMap) && |
- !(diagnostic instanceof tr.v.d.RelatedHistogramBreakdown) && |
- !(diagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) { |
- continue; |
- } |
- |
- for (const [unusedName, otherHist] of |
- this.get(tr.v.d.RESERVED_NAMES.MERGED_FROM)) { |
- const otherDiagnostic = otherHist.diagnostics.get(name); |
- if (!(otherDiagnostic instanceof tr.v.d.RelatedHistogramMap) && |
- !(otherDiagnostic instanceof tr.v.d.RelatedHistogramBreakdown) && |
- !(otherDiagnostic instanceof tr.v.d.UnmergeableDiagnosticSet)) { |
- continue; |
- } |
- diagnostic.mergeRelationships(otherDiagnostic, parentHist, otherHist); |
- } |
- } |
- } |
} |
return { |