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

Side by Side Diff: tracing/tracing/metrics/system_health/memory_metric.html

Issue 2656493002: Register metric Histogram names. (Closed)
Patch Set: rebase Created 3 years, 10 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 <link rel="import" href="/tracing/base/fixed_color_scheme.html"> 8 <link rel="import" href="/tracing/base/fixed_color_scheme.html">
9 <link rel="import" href="/tracing/base/iteration_helpers.html"> 9 <link rel="import" href="/tracing/base/iteration_helpers.html">
10 <link rel="import" href="/tracing/base/multi_dimensional_view.html"> 10 <link rel="import" href="/tracing/base/multi_dimensional_view.html">
(...skipping 1189 matching lines...) Expand 10 before | Expand all | Expand 10 after
1200 * |node| to it. 1200 * |node| to it.
1201 */ 1201 */
1202 function buildMemoryNumericFromNode(name, node, unit) { 1202 function buildMemoryNumericFromNode(name, node, unit) {
1203 var histogram = new tr.v.Histogram( 1203 var histogram = new tr.v.Histogram(
1204 name, unit, BOUNDARIES_FOR_UNIT_MAP.get(unit)); 1204 name, unit, BOUNDARIES_FOR_UNIT_MAP.get(unit));
1205 node.values.forEach(v => histogram.addSample(v.total)); 1205 node.values.forEach(v => histogram.addSample(v.total));
1206 return histogram; 1206 return histogram;
1207 } 1207 }
1208 1208
1209 tr.metrics.MetricRegistry.register(memoryMetric, { 1209 tr.metrics.MetricRegistry.register(memoryMetric, {
1210 supportsRangeOfInterest: true 1210 supportsRangeOfInterest: true,
1211 histogramNames: new Set([]),
1211 }); 1212 });
1212 1213
1213 return { 1214 return {
1214 memoryMetric, 1215 memoryMetric,
1215 }; 1216 };
1216 }); 1217 });
1217 </script> 1218 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/long_tasks_metric.html ('k') | tracing/tracing/metrics/system_health/power_metric.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698