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

Side by Side Diff: Source/devtools/front_end/sdk/CPUProfileDataModel.js

Issue 431273005: DevTools: Collect JS samples when recording timeline (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 /** 6 /**
7 * @constructor 7 * @constructor
8 * @param {!ProfilerAgent.CPUProfile} profile 8 * @param {!ProfilerAgent.CPUProfile} profile
9 */ 9 */
10 WebInspector.CPUProfileDataModel = function(profile) 10 WebInspector.CPUProfileDataModel = function(profile)
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 --stackTop; 286 --stackTop;
287 } 287 }
288 288
289 for (var node = idToNode[prevId]; node.parent; node = node.parent) { 289 for (var node = idToNode[prevId]; node.parent; node = node.parent) {
290 var start = stackStartTimes[stackTop]; 290 var start = stackStartTimes[stackTop];
291 var duration = sampleTime - start; 291 var duration = sampleTime - start;
292 stackChildrenDuration[stackTop - 1] += duration; 292 stackChildrenDuration[stackTop - 1] += duration;
293 closeFrameCallback(node.depth, node, start, duration, duration - sta ckChildrenDuration[stackTop]); 293 closeFrameCallback(node.depth, node, start, duration, duration - sta ckChildrenDuration[stackTop]);
294 --stackTop; 294 --stackTop;
295 } 295 }
296 },
297
298 /**
299 * @param {number} index
300 * @return {!ProfilerAgent.CPUProfileNode}
301 */
302 nodeByIndex: function(index)
303 {
304 return this._idToNode[this.samples[index]];
296 } 305 }
306
297 } 307 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698