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

Unified Diff: tracing/tracing/metrics/system_health/memory_metric.html

Issue 2998243002: Add sample Breakdowns to memoryMetric. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698