3 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildRetainers");
4 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildDominatedNodes");
5 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateFlags");
6 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildAggregates");
7 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateClassesRetainedSize");
8 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateObjectToWindowDistance");
9 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_calculateRetainedSizes");
10 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_markDetachedDOMTreeNodes");
11 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_markQueriableHeapObjects");
12 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_markPageOwnedNodes");
13 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_splitNodesAndContainmentEdges");
14 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildPostOrderIndex");
15 InspectorTest.measureFunction(WebInspector.HeapSnapshot.prototype, "_buildDominatorTree");
16 InspectorTest.measureFunction(WebInspector.HeapSnapshotConstructorsDataGrid.prototype, "_aggregatesReceived");
18 function performanceTest(timer)
20 var transferTimerCookie;
22 var changeViewTimerCookie;
25 var testName = /([^\/]+)\.html$/.exec(WebInspector.inspectedPageURL)[1];
26 var fullTimerCookie = timer.start("full-summary-snapshot-time");
27 var backendTimerCookie = timer.start("take-snapshot");
28 ProfilerAgent.takeHeapSnapshot(step0);
32 timer.finish(backendTimerCookie);
33 transferTimerCookie = timer.start("transfer-snapshot");
34 var profiles = WebInspector.panels.profiles.getProfiles("HEAP");
35 WebInspector.panels.profiles.showProfile(profiles[profiles.length - 1]);
36 InspectorTest.addSniffer(WebInspector.panels.profiles, "_finishHeapSnapshot", step1);
41 timer.finish(transferTimerCookie);
42 showTimerCookie = timer.start("show-snapshot");
43 var panel = WebInspector.panels.profiles;
44 var profile = panel._profilesIdMap[panel._makeKey(uid, WebInspector.HeapSnapshotProfileType.TypeId)];
45 profile.load(step2); // Add load callback.
50 timer.finish(showTimerCookie);
51 changeViewTimerCookie = timer.start("switch-to-containment-view");
52 InspectorTest.switchToView("Containment", cleanup);
57 timer.finish(changeViewTimerCookie);
58 timer.finish(fullTimerCookie);
59 clearTimerCookie = timer.start("clear-snapshot");
60 ProfilerAgent.clearProfiles(done);
61 WebInspector.panels.profiles._reset();
66 timer.finish(clearTimerCookie);
71 InspectorTest.runPerformanceTest(performanceTest, 60000);