3 WebInspector
.showPanel("profiles");
4 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildEdgeIndexes");
5 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildRetainers");
6 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildDominatedNodes");
7 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_calculateFlags");
8 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildAggregates");
9 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_calculateClassesRetainedSize");
10 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_calculateDistances");
11 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_calculateRetainedSizes");
12 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_markDetachedDOMTreeNodes");
13 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_markQueriableHeapObjects");
14 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_markPageOwnedNodes");
15 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_splitNodesAndContainmentEdges");
16 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildPostOrderIndex");
17 InspectorTest
.measureFunction(WebInspector
.JSHeapSnapshot
.prototype, "_buildDominatorTree");
18 InspectorTest
.measureFunction(WebInspector
.HeapSnapshotConstructorsDataGrid
.prototype, "_aggregatesReceived");
20 function performanceTest(timer
)
22 var transferTimerCookie
;
24 var changeViewTimerCookie
;
27 var testName
= /([^\/]+)\.html$/.exec(WebInspector
.inspectedPageURL
)[1];
28 var fullTimerCookie
= timer
.start("full-summary-snapshot-time");
29 var type
= WebInspector
.panels
.profiles
.getProfileType("HEAP");
31 var backendTimerCookie
= timer
.start("take-snapshot");
32 type
._takeHeapSnapshot(step0
);
36 timer
.finish(backendTimerCookie
);
37 transferTimerCookie
= timer
.start("transfer-snapshot");
38 var profiles
= type
.getProfiles();
39 InspectorTest
.addSniffer(profiles
[0]._transferHandler
, "_updateProgress", onUpdateProgress
, true);
40 InspectorTest
.addSniffer(profiles
[0], "_wasShown", step2
);
43 function onUpdateProgress(saved
, total
)
47 timer
.finish(transferTimerCookie
);
48 showTimerCookie
= timer
.start("show-snapshot");
53 timer
.finish(showTimerCookie
);
54 changeViewTimerCookie
= timer
.start("switch-to-containment-view");
55 InspectorTest
.switchToView("Containment", cleanup
);
60 timer
.finish(changeViewTimerCookie
);
61 timer
.finish(fullTimerCookie
);
62 clearTimerCookie
= timer
.start("clear-snapshot");
63 HeapProfilerAgent
.clearProfiles(done
);
64 WebInspector
.panels
.profiles
._reset();
69 timer
.finish(clearTimerCookie
);
74 InspectorTest
.runPerformanceTest(performanceTest
, 60000);