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

Side by Side Diff: Source/devtools/front_end/profiler/CPUProfileFlameChart.js

Issue 402113002: Draw marker events on Timeline flame chart (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 5 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 /** 1 /**
2 * Copyright (C) 2014 Google Inc. All rights reserved. 2 * Copyright (C) 2014 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 104
105 /** 105 /**
106 * @return {?WebInspector.FlameChart.TimelineData} 106 * @return {?WebInspector.FlameChart.TimelineData}
107 */ 107 */
108 timelineData: function() 108 timelineData: function()
109 { 109 {
110 return this._timelineData || this._calculateTimelineData(); 110 return this._timelineData || this._calculateTimelineData();
111 }, 111 },
112 112
113 /** 113 /**
114 * @param {number} index
115 * @return {string}
116 */
117 markerColor: function(index)
118 {
119 throw new Error("Unreachable.");
120 },
121
122 /**
123 * @param {number} index
124 * @return {string}
125 */
126 markerTitle: function(index)
127 {
128 throw new Error("Unreachable.");
129 },
130
131 /**
114 * @return {?WebInspector.FlameChart.TimelineData} 132 * @return {?WebInspector.FlameChart.TimelineData}
115 */ 133 */
116 _calculateTimelineData: function() 134 _calculateTimelineData: function()
117 { 135 {
118 /** 136 /**
119 * @constructor 137 * @constructor
120 * @param {number} depth 138 * @param {number} depth
121 * @param {number} duration 139 * @param {number} duration
122 * @param {number} startTime 140 * @param {number} startTime
123 * @param {number} selfTime 141 * @param {number} selfTime
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 var entry = entries[i]; 183 var entry = entries[i];
166 entryNodes[i] = entry.node; 184 entryNodes[i] = entry.node;
167 entryLevels[i] = entry.depth; 185 entryLevels[i] = entry.depth;
168 entryTotalTimes[i] = entry.duration; 186 entryTotalTimes[i] = entry.duration;
169 entryStartTimes[i] = entry.startTime; 187 entryStartTimes[i] = entry.startTime;
170 entrySelfTimes[i] = entry.selfTime; 188 entrySelfTimes[i] = entry.selfTime;
171 } 189 }
172 190
173 this._maxStackDepth = maxDepth; 191 this._maxStackDepth = maxDepth;
174 192
175 /** @type {!WebInspector.FlameChart.TimelineData} */ 193 this._timelineData = new WebInspector.FlameChart.TimelineData(entryLevel s, entryTotalTimes, entryStartTimes);
176 this._timelineData = {
177 entryLevels: entryLevels,
178 entryTotalTimes: entryTotalTimes,
179 entryStartTimes: entryStartTimes,
180 };
181 194
182 /** @type {!Array.<!ProfilerAgent.CPUProfileNode>} */ 195 /** @type {!Array.<!ProfilerAgent.CPUProfileNode>} */
183 this._entryNodes = entryNodes; 196 this._entryNodes = entryNodes;
184 this._entrySelfTimes = entrySelfTimes; 197 this._entrySelfTimes = entrySelfTimes;
185 198
186 return this._timelineData; 199 return this._timelineData;
187 }, 200 },
188 201
189 /** 202 /**
190 * @param {number} ms 203 * @param {number} ms
(...skipping 450 matching lines...) Expand 10 before | Expand all | Expand 10 after
641 { 654 {
642 var ratio = window.devicePixelRatio; 655 var ratio = window.devicePixelRatio;
643 this._overviewCanvas.width = width * ratio; 656 this._overviewCanvas.width = width * ratio;
644 this._overviewCanvas.height = height * ratio; 657 this._overviewCanvas.height = height * ratio;
645 this._overviewCanvas.style.width = width + "px"; 658 this._overviewCanvas.style.width = width + "px";
646 this._overviewCanvas.style.height = height + "px"; 659 this._overviewCanvas.style.height = height + "px";
647 }, 660 },
648 661
649 __proto__: WebInspector.VBox.prototype 662 __proto__: WebInspector.VBox.prototype
650 } 663 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698