Title: [109743] trunk
- Revision
- 109743
- Author
- loi...@chromium.org
- Date
- 2012-03-05 07:24:45 -0800 (Mon, 05 Mar 2012)
Log Message
Web Inspector: [chromium] introduce HeapSnapshot performance test.
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):
Modified Paths
Added Paths
Diff
Modified: trunk/PerformanceTests/ChangeLog (109742 => 109743)
--- trunk/PerformanceTests/ChangeLog 2012-03-05 15:14:38 UTC (rev 109742)
+++ trunk/PerformanceTests/ChangeLog 2012-03-05 15:24:45 UTC (rev 109743)
@@ -1,3 +1,12 @@
+2012-03-05 Ilya Tikhonovsky <loi...@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 <rn...@webkit.org>
DOM tests take too long to run
Added: trunk/PerformanceTests/inspector/detailed-heapshots-smoke-test.html (0 => 109743)
--- trunk/PerformanceTests/inspector/detailed-heapshots-smoke-test.html (rev 0)
+++ trunk/PerformanceTests/inspector/detailed-heapshots-smoke-test.html 2012-03-05 15:24:45 UTC (rev 109743)
@@ -0,0 +1,55 @@
+<html>
+<head>
+ <script src=""
+ <script src=""
+ <script src=""
+<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 = "" 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>
Property changes on: trunk/PerformanceTests/inspector/detailed-heapshots-smoke-test.html
___________________________________________________________________
Added: svn:eol-style
Modified: trunk/Source/WebCore/ChangeLog (109742 => 109743)
--- trunk/Source/WebCore/ChangeLog 2012-03-05 15:14:38 UTC (rev 109742)
+++ trunk/Source/WebCore/ChangeLog 2012-03-05 15:24:45 UTC (rev 109743)
@@ -1,3 +1,15 @@
+2012-03-05 Ilya Tikhonovsky <loi...@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 <pfeld...@chromium.org>
Web Inspector: cannot be launched when localStorage is disabled
Modified: trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js (109742 => 109743)
--- trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js 2012-03-05 15:14:38 UTC (rev 109742)
+++ trunk/Source/WebCore/inspector/front-end/HeapSnapshotProxy.js 2012-03-05 15:24:45 UTC (rev 109743)
@@ -263,20 +263,22 @@
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;
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
http://lists.webkit.org/mailman/listinfo.cgi/webkit-changes