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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/profiler/HeapProfileView.js

Issue 1932483002: DevTools: add measurement units to profile tree headers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 7 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 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 /** 5 /**
6 * @constructor 6 * @constructor
7 * @implements {WebInspector.Searchable} 7 * @implements {WebInspector.Searchable}
8 * @extends {WebInspector.ProfileView} 8 * @extends {WebInspector.ProfileView}
9 * @param {!WebInspector.SamplingHeapProfileHeader} profileHeader 9 * @param {!WebInspector.SamplingHeapProfileHeader} profileHeader
10 */ 10 */
11 WebInspector.HeapProfileView = function(profileHeader) 11 WebInspector.HeapProfileView = function(profileHeader)
12 { 12 {
13 this._profileHeader = profileHeader; 13 this._profileHeader = profileHeader;
14 this.profile = new WebInspector.SamplingHeapProfileModel(profileHeader._prof ile || profileHeader.protocolProfile()); 14 this.profile = new WebInspector.SamplingHeapProfileModel(profileHeader._prof ile || profileHeader.protocolProfile());
15 this.adjustedTotal = this.profile.total; 15 this.adjustedTotal = this.profile.total;
16 var views = [ 16 var views = [
17 WebInspector.ProfileView.ViewTypes.Heavy, 17 WebInspector.ProfileView.ViewTypes.Heavy,
18 WebInspector.ProfileView.ViewTypes.Tree 18 WebInspector.ProfileView.ViewTypes.Tree
19 ]; 19 ];
20 WebInspector.ProfileView.call(this, new WebInspector.HeapProfileView.NodeFor matter(this), views); 20 WebInspector.ProfileView.call(this, new WebInspector.HeapProfileView.NodeFor matter(this), views);
21 } 21 }
22 22
23 WebInspector.HeapProfileView.prototype = { 23 WebInspector.HeapProfileView.prototype = {
24 /**
25 * @override
26 * @return {string}
27 */
28 units: function()
29 {
30 return "Size [bytes]";
caseq 2016/04/27 21:24:07 WebInspector.UIString()
alph 2016/04/28 00:47:26 Done.
31 },
32
24 __proto__: WebInspector.ProfileView.prototype 33 __proto__: WebInspector.ProfileView.prototype
25 } 34 }
26 35
27 /** 36 /**
28 * @constructor 37 * @constructor
29 * @extends {WebInspector.ProfileType} 38 * @extends {WebInspector.ProfileType}
30 */ 39 */
31 WebInspector.SamplingHeapProfileType = function() 40 WebInspector.SamplingHeapProfileType = function()
32 { 41 {
33 WebInspector.ProfileType.call(this, WebInspector.SamplingHeapProfileType.Typ eId, WebInspector.UIString("Collect JavaScript Heap Profile")); 42 WebInspector.ProfileType.call(this, WebInspector.SamplingHeapProfileType.Typ eId, WebInspector.UIString("Collect JavaScript Heap Profile"));
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 * @override 284 * @override
276 * @param {!WebInspector.ProfileDataGridNode} node 285 * @param {!WebInspector.ProfileDataGridNode} node
277 * @return {!Element} 286 * @return {!Element}
278 */ 287 */
279 linkifyNode: function(node) 288 linkifyNode: function(node)
280 { 289 {
281 var callFrame = node.profileNode.frame; 290 var callFrame = node.profileNode.frame;
282 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi leView.target(), callFrame, "profile-node-file"); 291 return this._profileView.linkifier().linkifyConsoleCallFrame(this._profi leView.target(), callFrame, "profile-node-file");
283 } 292 }
284 } 293 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698