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

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

Issue 2771723003: [tracing] Move math utilities from base into their own subdirectory (attempt 2) (Closed)
Patch Set: rebase Created 3 years, 9 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/iteration_helpers.html"> 8 <link rel="import" href="/tracing/base/iteration_helpers.html">
9 <link rel="import" href="/tracing/base/math/range.html">
9 <link rel="import" href="/tracing/base/multi_dimensional_view.html"> 10 <link rel="import" href="/tracing/base/multi_dimensional_view.html">
10 <link rel="import" href="/tracing/base/range.html">
11 <link rel="import" href="/tracing/base/unit.html"> 11 <link rel="import" href="/tracing/base/unit.html">
12 <link rel="import" href="/tracing/metrics/metric_registry.html"> 12 <link rel="import" href="/tracing/metrics/metric_registry.html">
13 <link rel="import" href="/tracing/metrics/system_health/chrome_processes.html"> 13 <link rel="import" href="/tracing/metrics/system_health/chrome_processes.html">
14 <link rel="import" href="/tracing/model/container_memory_dump.html"> 14 <link rel="import" href="/tracing/model/container_memory_dump.html">
15 <link rel="import" href="/tracing/model/helpers/chrome_model_helper.html"> 15 <link rel="import" href="/tracing/model/helpers/chrome_model_helper.html">
16 <link rel="import" href="/tracing/model/memory_allocator_dump.html"> 16 <link rel="import" href="/tracing/model/memory_allocator_dump.html">
17 <link rel="import" href="/tracing/value/diagnostics/breakdown.html"> 17 <link rel="import" href="/tracing/value/diagnostics/breakdown.html">
18 <link rel="import" href="/tracing/value/histogram.html"> 18 <link rel="import" href="/tracing/value/histogram.html">
19 19
20 <script> 20 <script>
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 addGeneralMemoryDumpValues(browserNameToGlobalDumps, values); 61 addGeneralMemoryDumpValues(browserNameToGlobalDumps, values);
62 addDetailedMemoryDumpValues(browserNameToGlobalDumps, values); 62 addDetailedMemoryDumpValues(browserNameToGlobalDumps, values);
63 addMemoryDumpCountValues(browserNameToGlobalDumps, values); 63 addMemoryDumpCountValues(browserNameToGlobalDumps, values);
64 } 64 }
65 65
66 /** 66 /**
67 * Splits the global memory dumps in |model| by browser name. 67 * Splits the global memory dumps in |model| by browser name.
68 * 68 *
69 * @param {!tr.Model} model The trace model from which the global dumps 69 * @param {!tr.Model} model The trace model from which the global dumps
70 * should be extracted. 70 * should be extracted.
71 * @param {!tr.b.Range=} opt_rangeOfInterest If proided, global memory dumps 71 * @param {!tr.b.math.Range=} opt_rangeOfInterest If proided, global memory
72 * that do not inclusively intersect the range will be skipped. 72 * dumps that do not inclusively intersect the range will be skipped.
73 * @return {!Map<string, !Array<!tr.model.GlobalMemoryDump>} A map from 73 * @return {!Map<string, !Array<!tr.model.GlobalMemoryDump>} A map from
74 * browser names to the associated global memory dumps. 74 * browser names to the associated global memory dumps.
75 */ 75 */
76 function splitGlobalDumpsByBrowserName(model, opt_rangeOfInterest) { 76 function splitGlobalDumpsByBrowserName(model, opt_rangeOfInterest) {
77 var chromeModelHelper = 77 var chromeModelHelper =
78 model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper); 78 model.getOrCreateHelper(tr.model.helpers.ChromeModelHelper);
79 var browserNameToGlobalDumps = new Map(); 79 var browserNameToGlobalDumps = new Map();
80 var globalDumpToBrowserHelper = new WeakMap(); 80 var globalDumpToBrowserHelper = new WeakMap();
81 81
82 // 1. For each browser process in the model, add its global memory dumps to 82 // 1. For each browser process in the model, add its global memory dumps to
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after
1184 1184
1185 tr.metrics.MetricRegistry.register(memoryMetric, { 1185 tr.metrics.MetricRegistry.register(memoryMetric, {
1186 supportsRangeOfInterest: true 1186 supportsRangeOfInterest: true
1187 }); 1187 });
1188 1188
1189 return { 1189 return {
1190 memoryMetric, 1190 memoryMetric,
1191 }; 1191 };
1192 }); 1192 });
1193 </script> 1193 </script>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698