Index: tracing/tracing/metrics/system_health/memory_metric.html |
diff --git a/tracing/tracing/metrics/system_health/memory_metric.html b/tracing/tracing/metrics/system_health/memory_metric.html |
index 3000abbdb5770d4121e7961319805438368ce6cf..49133ff4345e858a1c5f1080d4afc4093dde7dc1 100644 |
--- a/tracing/tracing/metrics/system_health/memory_metric.html |
+++ b/tracing/tracing/metrics/system_health/memory_metric.html |
@@ -1198,6 +1198,17 @@ tr.exportTo('tr.metrics.sh', function() { |
return numeric; |
} |
+ function buildSampleDiagnostics(value, node) { |
+ const diagnostics = new Map(); |
+ const processes = new tr.v.d.Breakdown(); |
+ const components = new tr.v.d.Breakdown(); |
+ console.log(value, node); |
+ if (processes.size > 0) diagnostics.set('processes', processes); |
+ if (components.size > 0) diagnostics.set('components', components); |
+ if (diagnostics.size === 0) return undefined; |
+ return diagnostics; |
+ } |
+ |
/** |
* Create a memory tr.v.Histogram with |unit| and add all total values in |
* |node| to it. |
@@ -1205,7 +1216,10 @@ tr.exportTo('tr.metrics.sh', function() { |
function buildMemoryNumericFromNode(name, node, unit) { |
const histogram = new tr.v.Histogram( |
name, unit, BOUNDARIES_FOR_UNIT_MAP.get(unit)); |
- node.values.forEach(v => histogram.addSample(v.total)); |
+ |
+ node.values.forEach(v => histogram.addSample( |
+ v.total, buildSampleDiagnostics(v, node))); |
+ |
return histogram; |
} |