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

Side by Side Diff: third_party/WebKit/LayoutTests/http/tests/inspector/timeline-test.js

Issue 2673733003: DevTools: Speed up timeline aggregated tree building. (Closed)
Patch Set: 4 landing Created 3 years, 10 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
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/category-filter.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 function wrapCallFunctionForTimeline(f) 1 function wrapCallFunctionForTimeline(f)
2 { 2 {
3 var script = document.createElement("script"); 3 var script = document.createElement("script");
4 script.textContent = "(" + f.toString() + ")()\n//# sourceURL=wrapCallFuncti onForTimeline.js"; 4 script.textContent = "(" + f.toString() + ")()\n//# sourceURL=wrapCallFuncti onForTimeline.js";
5 document.body.appendChild(script); 5 document.body.appendChild(script);
6 } 6 }
7 7
8 var initialize_Timeline = function() { 8 var initialize_Timeline = function() {
9 9
10 InspectorTest.preloadPanel("timeline"); 10 InspectorTest.preloadPanel("timeline");
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 var selection = Timeline.TimelineSelection.fromRange(model.minimumRecordTime (), model.maximumRecordTime()); 219 var selection = Timeline.TimelineSelection.fromRange(model.minimumRecordTime (), model.maximumRecordTime());
220 view.updateContents(selection); 220 view.updateContents(selection);
221 InspectorTest.walkTimelineEventTreeUnderNode(callback, view._currentTree, 0) ; 221 InspectorTest.walkTimelineEventTreeUnderNode(callback, view._currentTree, 0) ;
222 } 222 }
223 223
224 InspectorTest.walkTimelineEventTreeUnderNode = function(callback, root, level) 224 InspectorTest.walkTimelineEventTreeUnderNode = function(callback, root, level)
225 { 225 {
226 var event = root.event; 226 var event = root.event;
227 if (event) 227 if (event)
228 callback(event, level) 228 callback(event, level)
229 var children = root.children ? root.children.values() : []; 229 for (var child of root.children().values())
230 for (var child of children)
231 InspectorTest.walkTimelineEventTreeUnderNode(callback, child, (level || 0) + 1); 230 InspectorTest.walkTimelineEventTreeUnderNode(callback, child, (level || 0) + 1);
232 } 231 }
233 232
234 InspectorTest.printTimestampRecords = function(typeName) 233 InspectorTest.printTimestampRecords = function(typeName)
235 { 234 {
236 var dividers = InspectorTest.timelineModel().eventDividers(); 235 var dividers = InspectorTest.timelineModel().eventDividers();
237 for (var event of dividers) { 236 for (var event of dividers) {
238 if (event.name === typeName) 237 if (event.name === typeName)
239 InspectorTest.printTraceEventProperties(event); 238 InspectorTest.printTraceEventProperties(event);
240 } 239 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
442 function waitForFrame() 441 function waitForFrame()
443 { 442 {
444 var callback; 443 var callback;
445 var promise = new Promise((fulfill) => callback = fulfill); 444 var promise = new Promise((fulfill) => callback = fulfill);
446 if (window.testRunner) 445 if (window.testRunner)
447 testRunner.capturePixelsAsyncThen(() => window.requestAnimationFrame(cal lback)); 446 testRunner.capturePixelsAsyncThen(() => window.requestAnimationFrame(cal lback));
448 else 447 else
449 window.requestAnimationFrame(callback); 448 window.requestAnimationFrame(callback);
450 return promise; 449 return promise;
451 } 450 }
OLDNEW
« no previous file with comments | « no previous file | third_party/WebKit/LayoutTests/inspector/tracing/category-filter.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698