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

Side by Side Diff: third_party/WebKit/Source/devtools/front_end/sdk/HeapProfilerModel.js

Issue 2279513002: DevTools: make hitCount optional & experimental in Profiler domain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
OLDNEW
1 /** 1 /**
2 * @constructor 2 * @constructor
3 * @extends {WebInspector.SDKModel} 3 * @extends {WebInspector.SDKModel}
4 * @param {!WebInspector.Target} target 4 * @param {!WebInspector.Target} target
5 */ 5 */
6 WebInspector.HeapProfilerModel = function(target) 6 WebInspector.HeapProfilerModel = function(target)
7 { 7 {
8 WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target); 8 WebInspector.SDKModel.call(this, WebInspector.HeapProfilerModel, target);
9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this)); 9 target.registerHeapProfilerDispatcher(new WebInspector.HeapProfilerDispatche r(this));
10 this._enabled = false; 10 this._enabled = false;
(...skipping 19 matching lines...) Expand all
30 this._heapProfilerAgent.enable(); 30 this._heapProfilerAgent.enable();
31 }, 31 },
32 32
33 startSampling: function() 33 startSampling: function()
34 { 34 {
35 var defaultSamplingIntervalInBytes = 16384; 35 var defaultSamplingIntervalInBytes = 16384;
36 this._heapProfilerAgent.startSampling(defaultSamplingIntervalInBytes); 36 this._heapProfilerAgent.startSampling(defaultSamplingIntervalInBytes);
37 }, 37 },
38 38
39 /** 39 /**
40 * @return {!Promise.<?ProfilerAgent.CPUProfile>} 40 * @return {!Promise.<?ProfilerAgent.Profile>}
41 */ 41 */
42 stopSampling: function() 42 stopSampling: function()
43 { 43 {
44 this._isRecording = false; 44 this._isRecording = false;
45 var currentProfile = null; 45 var currentProfile = null;
46 return this._heapProfilerAgent.stopSampling((error, profile) => { curren tProfile = !error ? profile : null; }) 46 return this._heapProfilerAgent.stopSampling((error, profile) => { curren tProfile = !error ? profile : null; })
47 .then(() => currentProfile); 47 .then(() => currentProfile);
48 }, 48 },
49 49
50 /** 50 /**
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 }, 141 },
142 142
143 /** 143 /**
144 * @override 144 * @override
145 */ 145 */
146 resetProfiles: function() 146 resetProfiles: function()
147 { 147 {
148 this._heapProfilerModel.resetProfiles(); 148 this._heapProfilerModel.resetProfiles();
149 } 149 }
150 } 150 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698