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

Side by Side Diff: third_party/WebKit/LayoutTests/inspector/tracing/trace-event-self-time.html

Issue 2150803002: [DevTools] Add callFrame to CPUProfileNode & SamplingHeapProfileNode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressed comments Created 4 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
OLDNEW
1 <html> 1 <html>
2 <head> 2 <head>
3 <script src="../../http/tests/inspector/inspector-test.js"></script> 3 <script src="../../http/tests/inspector/inspector-test.js"></script>
4 <script src="../../http/tests/inspector/timeline-test.js"></script> 4 <script src="../../http/tests/inspector/timeline-test.js"></script>
5 <script> 5 <script>
6 function test() 6 function test()
7 { 7 {
8 var sessionId = "6.23"; 8 var sessionId = "6.23";
9 var rawTraceEvents = [ 9 var rawTraceEvents = [
10 { 10 {
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after
256 "pid": 17851, 256 "pid": 17851,
257 "tid": 23, 257 "tid": 23,
258 "ts": 1500000, 258 "ts": 1500000,
259 }, 259 },
260 ]; 260 ];
261 261
262 var cpuProfile = { 262 var cpuProfile = {
263 startTime: 420, 263 startTime: 420,
264 endTime: 430, 264 endTime: 430,
265 head: { 265 head: {
266 functionName: "(root)", 266 callFrame: { functionName: "(root)" },
267 id: 1, 267 id: 1,
268 children: [{ 268 children: [{
269 functionName: "foo", 269 callFrame: { functionName: "foo" },
270 id: 2, 270 id: 2,
271 children: [{ 271 children: [{
272 functionName: "bar", 272 callFrame: { functionName: "bar" },
273 id: 3, 273 id: 3,
274 children: [] 274 children: []
275 }, 275 },
276 { 276 {
277 functionName: "baz", 277 callFrame: { functionName: "baz" },
278 id: 4, 278 id: 4,
279 children: [] 279 children: []
280 }] 280 }]
281 }] 281 }]
282 }, 282 },
283 timestamps: [421000, 422000, 423000, 424000, 425000, 426000, 427000, 428 000, 429000], 283 timestamps: [421000, 422000, 423000, 424000, 425000, 426000, 427000, 428 000, 429000],
284 samples: [2, 2, 3, 3, 3, 4, 4, 2, 2 ] 284 samples: [2, 2, 3, 3, 3, 4, 4, 2, 2 ]
285 }; 285 };
286 286
287 var timelineController = InspectorTest.timelineController(); 287 var timelineController = InspectorTest.timelineController();
288 timelineController._addCpuProfile(WebInspector.targetManager.mainTarget().id (), null, cpuProfile); 288 timelineController._addCpuProfile(WebInspector.targetManager.mainTarget().id (), null, cpuProfile);
289 timelineController.traceEventsCollected(rawTraceEvents); 289 timelineController.traceEventsCollected(rawTraceEvents);
290 timelineController.tracingComplete(); 290 timelineController.tracingComplete();
291 InspectorTest.addSniffer(WebInspector.panels.timeline, "loadingComplete", () => { 291 InspectorTest.addSniffer(WebInspector.panels.timeline, "loadingComplete", () => {
292 var events = InspectorTest.timelineModel().inspectedTargetEvents(); 292 var events = InspectorTest.timelineModel().inspectedTargetEvents();
293 events.forEach(e => InspectorTest.addResult(e.name + ": " + e.startTime + " " + (e.selfTime || 0).toFixed(2) + "/" + (e.duration || 0).toFixed(2))); 293 events.forEach(e => InspectorTest.addResult(e.name + ": " + e.startTime + " " + (e.selfTime || 0).toFixed(2) + "/" + (e.duration || 0).toFixed(2)));
294 InspectorTest.completeTest(); 294 InspectorTest.completeTest();
295 }); 295 });
296 } 296 }
297 297
298 </script> 298 </script>
299 </head> 299 </head>
300 <body onload="runTest()"> 300 <body onload="runTest()">
301 </body> 301 </body>
302 </html> 302 </html>
303 303
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698