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

Side by Side Diff: tracing/tracing/model/memory_dump_test_utils.html

Issue 3012153002: Add leakDetectionMetric for tracing (Closed)
Patch Set: Reflect comments 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 unified diff | Download patch
« no previous file with comments | « tracing/tracing/metrics/system_health/utils.html ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/scalar.html"> 8 <link rel="import" href="/tracing/base/scalar.html">
9 <link rel="import" href="/tracing/base/unit.html"> 9 <link rel="import" href="/tracing/base/unit.html">
10 <link rel="import" href="/tracing/model/container_memory_dump.html"> 10 <link rel="import" href="/tracing/model/container_memory_dump.html">
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
117 MemoryDumpTestUtils.newAllocatorDump = function( 117 MemoryDumpTestUtils.newAllocatorDump = function(
118 containerDump, fullName, opt_options) { 118 containerDump, fullName, opt_options) {
119 const dump = new MemoryAllocatorDump(containerDump, fullName, 119 const dump = new MemoryAllocatorDump(containerDump, fullName,
120 getOption(opt_options, 'guid')); 120 getOption(opt_options, 'guid'));
121 const numerics = getOption(opt_options, 'numerics'); 121 const numerics = getOption(opt_options, 'numerics');
122 if (numerics) { 122 if (numerics) {
123 for (const [numericName, value] of Object.entries(numerics)) { 123 for (const [numericName, value] of Object.entries(numerics)) {
124 dump.addNumeric(numericName, castToScalar(value)); 124 dump.addNumeric(numericName, castToScalar(value));
125 } 125 }
126 } 126 }
127 const children = getOption(opt_options, 'children');
128 if (children) dump.children = children;
127 return dump; 129 return dump;
128 }; 130 };
129 131
130 /** 132 /**
131 * Create a new child memory allocator dump and add it to a parent memory 133 * Create a new child memory allocator dump and add it to a parent memory
132 * allocator dump. 134 * allocator dump.
133 * 135 *
134 * @param {!tr.model.MemoryAllocatorDump} parentDump The parent allocator 136 * @param {!tr.model.MemoryAllocatorDump} parentDump The parent allocator
135 * dump. 137 * dump.
136 * @param {string} name The name of the child allocator dump (excluding 138 * @param {string} name The name of the child allocator dump (excluding
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 assert.strictEqual(actualRegion.mappedFile, expectedRegion.mappedFile); 211 assert.strictEqual(actualRegion.mappedFile, expectedRegion.mappedFile);
210 assert.deepEqual(actualRegion.byteStats, expectedRegion.byteStats); 212 assert.deepEqual(actualRegion.byteStats, expectedRegion.byteStats);
211 } 213 }
212 }; 214 };
213 215
214 return { 216 return {
215 MemoryDumpTestUtils, 217 MemoryDumpTestUtils,
216 }; 218 };
217 }); 219 });
218 </script> 220 </script>
OLDNEW
« no previous file with comments | « tracing/tracing/metrics/system_health/utils.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698