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