https://bugs.webkit.org/show_bug.cgi?id=80280
Reviewed by Pavel Feldman.
PerformanceTests:
* inspector/detailed-heapshots-smoke-test.html: Added.
Source/WebCore:
* inspector/front-end/HeapSnapshotProxy.js:
(WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData):
(WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
(WebInspector.HeapSnapshotLoaderProxy.prototype._callLoadCallbacks):
git-svn-id: http://svn.webkit.org/repository/webkit/trunk@109743
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2012-03-05 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: [chromium] introduce HeapSnapshot performance test.
+ https://bugs.webkit.org/show_bug.cgi?id=80280
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/detailed-heapshots-smoke-test.html: Added.
+
2012-03-01 Ryosuke Niwa <rniwa@webkit.org>
DOM tests take too long to run
--- /dev/null
+<html>
+<head>
+ <script src="../../LayoutTests/http/tests/inspector/inspector-test.js"></script>
+ <script src="../../LayoutTests/inspector/profiler/detailed-heapshots-test.js"></script>
+ <script src="performance-test.js"></script>
+<script>
+
+function test()
+{
+ function performanceTest(timer)
+ {
+
+ var showPanelTimerCookie = timer.start("panel-update");
+ ProfilerAgent.takeHeapSnapshot(step0);
+
+ function step0()
+ {
+ var profiles = WebInspector.panels.profiles.getProfiles("HEAP");
+ WebInspector.panels.profiles.showProfile(profiles[profiles.length - 1]);
+ InspectorTest.addSniffer(WebInspector.panels.profiles, "_finishHeapSnapshot", step1);
+ }
+
+ function step1(uid)
+ {
+ var panel = WebInspector.panels.profiles;
+ var profile = panel._profilesIdMap[panel._makeKey(uid, WebInspector.DetailedHeapshotProfileType.TypeId)];
+ InspectorTest.addSniffer(profile.proxy, "_callLoadCallbacks", step2);
+ }
+
+ function step2()
+ {
+ InspectorTest.switchToView("Containment", cleanup);
+ }
+
+ function cleanup()
+ {
+ timer.finish(showPanelTimerCookie);
+ ProfilerAgent.clearProfiles(done);
+ WebInspector.panels.profiles._reset();
+ }
+
+ function done()
+ {
+ timer.done("take-snapshot");
+ }
+ }
+
+ InspectorTest.runPerformanceTest(performanceTest, 25000);
+}
+
+</script>
+</head>
+<body onload="runTest()">
+</body>
+</html>
+2012-03-05 Ilya Tikhonovsky <loislo@chromium.org>
+
+ Web Inspector: [chromium] introduce HeapSnapshot performance test.
+ https://bugs.webkit.org/show_bug.cgi?id=80280
+
+ Reviewed by Pavel Feldman.
+
+ * inspector/front-end/HeapSnapshotProxy.js:
+ (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading.updateStaticData):
+ (WebInspector.HeapSnapshotLoaderProxy.prototype.finishLoading):
+ (WebInspector.HeapSnapshotLoaderProxy.prototype._callLoadCallbacks):
+
2012-03-05 Pavel Feldman <pfeldman@chromium.org>
Web Inspector: cannot be launched when localStorage is disabled
delete this._onLoadCallbacks;
this._loading = false;
this._loaded = true;
- function callLoadCallbacks(snapshotProxy)
- {
- for (var i = 0; i < loadCallbacks.length; ++i)
- loadCallbacks[i](snapshotProxy);
- }
+ var self = this;
function updateStaticData(snapshotProxy)
{
this.dispose();
- snapshotProxy.updateStaticData(callLoadCallbacks);
+ snapshotProxy.updateStaticData(this._callLoadCallbacks.bind(this, loadCallbacks));
}
this.callFactoryMethod(updateStaticData.bind(this), "finishLoading", "WebInspector.HeapSnapshotProxy");
return true;
},
+ _callLoadCallbacks: function(loadCallbacks, snapshotProxy)
+ {
+ for (var i = 0; i < loadCallbacks.length; ++i)
+ loadCallbacks[i](snapshotProxy);
+ },
+
get loaded()
{
return this._loaded;